3d84bb8147b1c3d1fd01e537c57f3530a94a0a94
[gnupg.git] / doc / Makefile.am
1 # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
2 #
3 # This file is part of GnuPG.
4 #
5 # GnuPG is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9
10 # GnuPG is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17
18 ## Process this file with automake to produce Makefile.in
19
20 examples = examples/README examples/scd-event examples/trustlist.txt \
21            examples/gpgconf.conf
22
23 EXTRA_DIST = DETAILS HACKING TRANSLATE OpenPGP KEYSERVER samplekeys.asc \
24              gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png \
25              gnupg-card-architecture.eps gnupg-card-architecture.png \
26              gnupg-card-architecture.pdf \
27              faq.raw FAQ faq.html gnupg7.texi \
28              opt-homedir.texi see-also-note.texi specify-user-id.texi \
29              gpgv.texi texi.css $(examples) yat2m.c
30
31 BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \
32                 gnupg-card-architecture.pdf FAQ faq.html
33
34 info_TEXINFOS = gnupg.texi
35
36 dist_pkgdata_DATA = qualified.txt FAQ faq.html com-certs.pem
37
38 gnupg_TEXINFOS = \
39         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
40         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
41         sysnotes.texi gnupg-card-architecture.fig \
42         howtos.texi howto-create-a-server-cert.texi
43
44 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
45
46 AM_MAKEINFOFLAGS = -I $(srcdir) --css-include=$(srcdir)/texi.css
47
48 YAT2M_OPTIONS = -I $(srcdir) \
49         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard"
50
51 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
52                 scdaemon.texi tools.texi
53 myman_pages   = gpg2.1 gpgsm.1 gpg-agent.1 scdaemon.1 gpgv2.1 \
54                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
55                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
56                 gpgsm-gencert.sh.1 applygnupgdefaults.8
57
58 man_MANS = $(myman_pages)
59 noinst_MANS = gnupg.7
60
61 watchgnupg_SOURCE = gnupg.texi
62
63
64 CLEANFILES = faq.raw.xref yat2m
65
66 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
67                  $(myman_pages) gnupg.7
68
69 yat2m: yat2m.c
70         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
71
72
73 .fig.png:
74         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
75
76 .fig.jpg:
77         fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
78
79 .fig.eps:
80         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
81
82 .fig.pdf:
83         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
84
85
86 FAQ : faq.raw
87 if WORKING_FAQPROG
88         $(FAQPROG) -f $<  $@ || $(FAQPROG) -f $< $@
89 else
90         : Warning: missing faqprog.pl, cannot make $@
91         echo "No $@ due to missing faqprog.pl" > $@
92         echo "See ftp://ftp.gnupg.org/gcrypt/contrib/faqprog.pl" >> $@
93 endif
94
95 faq.html : faq.raw
96 if WORKING_FAQPROG
97         $(FAQPROG) -h -f $< $@ 2>&1 || $(FAQPROG) -h -f $< $@
98 else
99         : Warning: missing faqprog.pl, cannot make $@
100         echo "No $@ due to missing faqprog.pl" > $@
101         echo "See ftp://ftp.gnupg.org/gcrypt/contrib/faqprog.pl" >> $@
102 endif
103
104
105 yat2m-stamp: $(myman_sources)
106         @rm -f yat2m-stamp.tmp
107         @touch yat2m-stamp.tmp
108         for file in $(myman_sources) ; do \
109               ./yat2m $(YAT2M_OPTIONS) --store \
110                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
111         @mv -f yat2m-stamp.tmp $@
112
113 yat2m-stamp: yat2m
114
115 $(myman_pages) gnupg.7 : yat2m-stamp
116         @if test -f $@; then :; else \
117             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
118                if mkdir yat2m-lock 2>/dev/null; then \
119                  rm -f yat2m-stamp; \
120                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
121                  rmdir yat2m-lock; \
122                else \
123                  while test -d yat2m-lock; do sleep 1; done; \
124                  test -f yat2m-stamp; exit $$?; \
125                fi; \
126              fi
127
128 # Make sure that gnupg.texi is touched if any other source file has
129 # been modified.  This is required so that the version.texi magic
130 # updates the release date.
131 gnupg.texi : $(gnupg_TEXINFOS)
132         touch $(srcdir)/gnupg.texi
133
134 install-html-local:
135         cp $(srcdir)/gnupg-logo.png gnupg.html/
136
137 online: gnupg.html gnupg.pdf
138         set -e; \
139         echo "Uploading current manuals to www.gnupg.org ..."; \
140         cp gnupg-logo.png gnupg.html/; \
141         user=werner ; dashdevel="" ; \
142         if echo "@PACKAGE_VERSION@" | grep -- "-svn" >/dev/null; then \
143           dashdevel="-devel" ; \
144         else \
145           rsync -v gnupg.pdf $${user}@cvs.gnupg.org:webspace/manuals/ ; \
146         fi ; \
147         cd gnupg.html ; \
148         rsync -vr --exclude='.svn' .  \
149           $${user}@cvs.gnupg.org:webspace/manuals/gnupg$${dashdevel}/ 
150