2008-01-15 Marcus Brinkmann <marcus@g10code.de>
[gnupg.git] / doc / Makefile.am
blob453d75b2dc3e2098d97a84104b25f342ef7ea66a
1 # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
3 # This file is part of GnuPG.
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/>.
18 ## Process this file with automake to produce Makefile.in
20 examples = examples/README examples/scd-event examples/trustlist.txt \
21            examples/gpgconf.conf examples/pwpattern.list
23 helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt                \
24             help.da.txt help.de.txt help.el.txt help.eo.txt             \
25             help.es.txt help.et.txt help.fi.txt help.fr.txt             \
26             help.gl.txt help.hu.txt help.id.txt help.it.txt             \
27             help.ja.txt help.nb.txt help.pl.txt help.pt.txt             \
28             help.pt_BR.txt help.ro.txt help.ru.txt help.sk.txt          \
29             help.sv.txt help.tr.txt help.zh_CN.txt help.zh_TW.txt
31 EXTRA_DIST = DETAILS HACKING TRANSLATE OpenPGP KEYSERVER samplekeys.asc \
32              gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png \
33              gnupg-card-architecture.eps gnupg-card-architecture.png \
34              gnupg-card-architecture.pdf \
35              faq.raw FAQ faq.html gnupg7.texi \
36              opt-homedir.texi see-also-note.texi specify-user-id.texi \
37              gpgv.texi texi.css $(examples) yat2m.c
39 BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \
40                 gnupg-card-architecture.pdf FAQ faq.html
42 info_TEXINFOS = gnupg.texi
44 dist_pkgdata_DATA = qualified.txt FAQ faq.html com-certs.pem \
45                     $(helpfiles)
47 gnupg_TEXINFOS = \
48         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
49         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
50         sysnotes.texi gnupg-card-architecture.fig \
51         howtos.texi howto-create-a-server-cert.texi
53 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
55 AM_MAKEINFOFLAGS = -I $(srcdir) --css-include=$(srcdir)/texi.css
57 YAT2M_OPTIONS = -I $(srcdir) \
58         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard"
60 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
61                 scdaemon.texi tools.texi
62 myman_pages   = gpg2.1 gpgsm.1 gpg-agent.1 scdaemon.1 gpgv2.1 \
63                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
64                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
65                 gpgsm-gencert.sh.1 applygnupgdefaults.8
67 man_MANS = $(myman_pages)
68 noinst_MANS = gnupg.7
70 watchgnupg_SOURCE = gnupg.texi
73 CLEANFILES = faq.raw.xref yat2m
75 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
76                  $(myman_pages) gnupg.7
78 yat2m: yat2m.c
79         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
82 .fig.png:
83         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
85 .fig.jpg:
86         fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
88 .fig.eps:
89         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
91 .fig.pdf:
92         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
95 FAQ : faq.raw
96 if WORKING_FAQPROG
97         $(FAQPROG) -f $<  $@ || $(FAQPROG) -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
104 faq.html : faq.raw
105 if WORKING_FAQPROG
106         $(FAQPROG) -h -f $< $@ 2>&1 || $(FAQPROG) -h -f $< $@
107 else
108         : Warning: missing faqprog.pl, cannot make $@
109         echo "No $@ due to missing faqprog.pl" > $@
110         echo "See ftp://ftp.gnupg.org/gcrypt/contrib/faqprog.pl" >> $@
111 endif
114 yat2m-stamp: $(myman_sources)
115         @rm -f yat2m-stamp.tmp
116         @touch yat2m-stamp.tmp
117         for file in $(myman_sources) ; do \
118               ./yat2m $(YAT2M_OPTIONS) --store \
119                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
120         @mv -f yat2m-stamp.tmp $@
122 yat2m-stamp: yat2m
124 $(myman_pages) gnupg.7 : yat2m-stamp
125         @if test -f $@; then :; else \
126             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
127                if mkdir yat2m-lock 2>/dev/null; then \
128                  rm -f yat2m-stamp; \
129                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
130                  rmdir yat2m-lock; \
131                else \
132                  while test -d yat2m-lock; do sleep 1; done; \
133                  test -f yat2m-stamp; exit $$?; \
134                fi; \
135              fi
137 # Make sure that gnupg.texi is touched if any other source file has
138 # been modified.  This is required so that the version.texi magic
139 # updates the release date.
140 gnupg.texi : $(gnupg_TEXINFOS)
141         touch $(srcdir)/gnupg.texi
143 install-html-local:
144         cp $(srcdir)/gnupg-logo.png gnupg.html/
146 online: gnupg.html gnupg.pdf
147         set -e; \
148         echo "Uploading current manuals to www.gnupg.org ..."; \
149         cp gnupg-logo.png gnupg.html/; \
150         user=werner ; dashdevel="" ; \
151         if echo "@PACKAGE_VERSION@" | grep -- "-svn" >/dev/null; then \
152           dashdevel="-devel" ; \
153         else \
154           rsync -v gnupg.pdf $${user}@cvs.gnupg.org:webspace/manuals/ ; \
155         fi ; \
156         cd gnupg.html ; \
157         rsync -vr --exclude='.svn' .  \
158           $${user}@cvs.gnupg.org:webspace/manuals/gnupg$${dashdevel}/