doc: Don't install gpg-zip.1.
[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 examples/pwpattern.list
22
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
30
31 EXTRA_DIST = samplekeys.asc ChangeLog-2011 \
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 gnupg7.texi \
36              opt-homedir.texi see-also-note.texi specify-user-id.texi \
37              gpgv.texi yat2m.c
38
39 BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \
40                 gnupg-card-architecture.pdf
41
42 info_TEXINFOS = gnupg.texi
43
44 dist_pkgdata_DATA = qualified.txt com-certs.pem $(helpfiles)
45
46 nobase_dist_doc_DATA = FAQ DETAILS HACKING TRANSLATE OpenPGP KEYSERVER \
47                        $(examples)
48
49
50 gnupg_TEXINFOS = \
51         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
52         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
53         sysnotes.texi gnupg-card-architecture.fig \
54         howtos.texi howto-create-a-server-cert.texi
55
56 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
57
58 AM_MAKEINFOFLAGS = -I $(srcdir) --css-ref=/share/site.css
59
60 YAT2M_OPTIONS = -I $(srcdir) \
61         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard"
62
63 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
64                 scdaemon.texi tools.texi
65 myman_pages   = gpg2.1 gpgsm.1 gpg-agent.1 scdaemon.1 gpgv2.1 \
66                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
67                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
68                 gpgsm-gencert.sh.1 applygnupgdefaults.8
69
70 man_MANS = $(myman_pages)
71 noinst_MANS = gnupg.7
72
73 watchgnupg_SOURCE = gnupg.texi
74
75
76 CLEANFILES = yat2m faq.txt
77
78 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
79                  $(myman_pages) gpg-zip.1 gnupg.7
80
81 yat2m: yat2m.c
82         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
83
84 .fig.png:
85         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
86
87 .fig.jpg:
88         fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
89
90 .fig.eps:
91         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
92
93 .fig.pdf:
94         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
95
96 yat2m-stamp: $(myman_sources)
97         rm -f yat2m-stamp.tmp
98         touch yat2m-stamp.tmp
99         for file in $(myman_sources) ; do \
100               ./yat2m $(YAT2M_OPTIONS) --store \
101                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
102         mv -f yat2m-stamp.tmp $@
103
104 yat2m-stamp: yat2m
105
106 $(myman_pages) gnupg.7 : yat2m-stamp
107         @if test -f $@; then :; else \
108             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
109                if mkdir yat2m-lock 2>/dev/null; then \
110                  rm -f yat2m-stamp; \
111                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
112                  rmdir yat2m-lock; \
113                else \
114                  while test -d yat2m-lock; do sleep 1; done; \
115                  test -f yat2m-stamp; exit $$?; \
116                fi; \
117              fi
118
119 # Make sure that gnupg.texi is touched if any other source file has
120 # been modified.  This is required so that the version.texi magic
121 # updates the release date.
122 gnupg.texi : $(gnupg_TEXINFOS)
123         touch $(srcdir)/gnupg.texi
124
125 # Copy shared files from the master branch.  We keep the texinfo files
126 # all in master so that we need to modify only one source.  Macros are
127 # used to customize them for a specific version.
128 update-source:
129         @set -e; cd $(srcdir); \
130          for i in $(gnupg_TEXINFOS) yat2m.c ; do \
131            echo "updating from master:doc/$$i" >&2 ; \
132            git show master:doc/$$i >$$i ; \
133          done
134
135 online: gnupg.html gnupg.pdf
136         set -e; \
137         echo "Uploading current manuals to www.gnupg.org ..."; \
138         cp $(srcdir)/gnupg-logo.png gnupg.html/; \
139         user=werner ; webhost=ftp.gnupg.org; dashdevel="" ; \
140         if echo "@PACKAGE_VERSION@" | grep -- "-git" >/dev/null; then \
141           dashdevel="-devel" ; \
142         else \
143           scp gnupg.pdf $${user}@$${webhost}:webspace/manuals/gnupg-2.0.pdf ; \
144         fi ; \
145         cd gnupg.html ; \
146         rsync -vr --exclude='.git' .  \
147           $${user}@$${webhost}:webspace/manuals/gnupg-2.0$${dashdevel}/