Imported Upstream version 1.8.4
[platform/upstream/libgcrypt.git] / doc / Makefile.am
1 ## Process this file with automake to create Makefile.in
2 # Copyright (C) 2002 Free Software Foundation, Inc.
3 #
4 # This file is part of Libgcrypt.
5 #
6 # Libgcrypt is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of
9 # the License, or (at your option) any later version.
10 #
11 # Libgcrypt is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 EXTRA_DIST = README.apichanges HACKING DCO \
21              libgcrypt-modules.eps fips-fsm.eps \
22              libgcrypt-modules.png fips-fsm.png \
23              libgcrypt-modules.pdf fips-fsm.pdf \
24              yat2m.c
25
26 DISTCLEANFILES = gcrypt.cps yat2m-stamp.tmp yat2m-stamp $(myman_pages)
27 CLEANFILES = yat2m
28
29 BUILT_SOURCES = libgcrypt-modules.eps fips-fsm.eps \
30                 libgcrypt-modules.png fips-fsm.png \
31                 libgcrypt-modules.pdf fips-fsm.pdf
32
33 info_TEXINFOS = gcrypt.texi
34 gcrypt_TEXINFOS = lgpl.texi gpl.texi libgcrypt-modules.fig fips-fsm.fig
35
36 YAT2M_OPTIONS = -I $(srcdir) \
37         --release "Libgcrypt @PACKAGE_VERSION@" --source "Libgcrypt"
38
39 myman_sources = gcrypt.texi
40 myman_pages   = hmac256.1
41
42 man_MANS = $(myman_pages)
43
44 yat2m: yat2m.c
45         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
46
47 .fig.png:
48         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
49
50 .fig.jpg:
51         fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
52
53 .fig.eps:
54         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
55
56 .fig.pdf:
57         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
58
59 yat2m-stamp: $(myman_sources)
60         @rm -f yat2m-stamp.tmp
61         @touch yat2m-stamp.tmp
62         for file in $(myman_sources) ; do \
63               ./yat2m $(YAT2M_OPTIONS) --store \
64                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
65         @mv -f yat2m-stamp.tmp $@
66
67 yat2m-stamp: yat2m
68
69 $(myman_pages) : yat2m-stamp
70         @if test -f $@; then :; else \
71             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
72                if mkdir yat2m-lock 2>/dev/null; then \
73                  rm -f yat2m-stamp; \
74                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
75                  rmdir yat2m-lock; \
76                else \
77                  while test -d yat2m-lock; do sleep 1; done; \
78                  test -f yat2m-stamp; exit $$?; \
79                fi; \
80              fi
81
82
83 # Make sure that gcrypt.texi is touched if any other source file has
84 # been modified.  This is required so that the version.texi magic
85 # updates the release date.
86 gcrypt.texi : $(gcrypt_TEXINFOS)
87         touch $(srcdir)/gcrypt.texi
88
89 online: gcrypt.html gcrypt.pdf gcrypt.info
90         set -e; \
91         echo "Uploading current manuals to www.gnupg.org ..."; \
92         cp libgcrypt-modules.png gcrypt.html/; \
93         cp fips-fsm.png gcrypt.html/; \
94         user=werner ; dashdevel="" ; \
95         if echo "@PACKAGE_VERSION@" | grep -- "-svn" >/dev/null; then \
96           dashdevel="-devel" ; \
97           cp gcrypt.pdf gcrypt.html/; \
98           cp gcrypt.info gcrypt.html/; \
99         else \
100           rsync -v gcrypt.pdf gcrypt.info \
101                $${user}@trithemius.gnupg.org:webspace/manuals/ ; \
102         fi ; \
103         cd gcrypt.html ; \
104         rsync -vr --exclude='.svn' .  \
105           $${user}@trithemius.gnupg.org:webspace/manuals/gcrypt$${dashdevel}/