doc: Minor change to the included yat2m.
[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 <https://www.gnu.org/licenses/>.
17
18 ## Process this file with automake to produce Makefile.in
19
20 AM_CPPFLAGS =
21
22 include $(top_srcdir)/am/cmacros.am
23
24 examples = examples/README examples/scd-event examples/trustlist.txt    \
25            examples/vsnfd.prf examples/debug.prf examples/qualified.txt \
26            examples/systemd-user/README                                 \
27            examples/systemd-user/dirmngr.service                        \
28            examples/systemd-user/dirmngr.socket                         \
29            examples/systemd-user/gpg-agent.service                      \
30            examples/systemd-user/gpg-agent.socket                       \
31            examples/systemd-user/gpg-agent-ssh.socket                   \
32            examples/systemd-user/gpg-agent-browser.socket               \
33            examples/systemd-user/gpg-agent-extra.socket                 \
34            examples/gpgconf.conf examples/pwpattern.list
35
36 helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt                \
37             help.da.txt help.de.txt help.el.txt help.eo.txt             \
38             help.es.txt help.et.txt help.fi.txt help.fr.txt             \
39             help.gl.txt help.hu.txt help.id.txt help.it.txt             \
40             help.ja.txt help.nb.txt help.pl.txt help.pt.txt             \
41             help.pt_BR.txt help.ro.txt help.ru.txt help.sk.txt          \
42             help.sv.txt help.tr.txt help.zh_CN.txt help.zh_TW.txt
43
44 profiles =
45
46 EXTRA_DIST = samplekeys.asc mksamplekeys com-certs.pem \
47              gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png gnupg-logo-tr.png \
48              gnupg-module-overview.png gnupg-module-overview.pdf \
49              gnupg-card-architecture.png gnupg-card-architecture.pdf \
50              FAQ gnupg7.texi mkdefsinc.c defsincdate \
51              opt-homedir.texi see-also-note.texi specify-user-id.texi \
52              gpgv.texi yat2m.c ChangeLog-2011 whats-new-in-2.1.txt \
53              trust-values.texi
54
55 BUILT_SOURCES = gnupg-module-overview.png gnupg-module-overview.pdf \
56                 gnupg-card-architecture.png gnupg-card-architecture.pdf \
57                 defsincdate defs.inc
58
59 info_TEXINFOS = gnupg.texi
60
61 dist_pkgdata_DATA =  $(helpfiles) $(profiles)
62
63 nobase_dist_doc_DATA = FAQ DETAILS HACKING DCO TRANSLATE OpenPGP KEYSERVER \
64                        $(examples)
65
66 #dist_html_DATA =
67
68
69 gnupg_TEXINFOS = \
70         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
71         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
72         sysnotes.texi dirmngr.texi wks.texi gpg-card.texi \
73         gnupg-module-overview.svg \
74         gnupg-card-architecture.fig \
75         howtos.texi howto-create-a-server-cert.texi
76
77 gnupg.texi : defs.inc
78
79 # We need EPS files for "make distcheck" but we do not want to distribute
80 # them due to their size.  Let's build them as needed.
81 gnupg.dvi : gnupg-module-overview.eps gnupg-card-architecture.eps
82
83
84 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
85
86 AM_MAKEINFOFLAGS = -I $(srcdir) --css-ref=/share/site.css
87
88 YAT2M_OPTIONS = -I $(srcdir) \
89         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard 2.2"
90
91 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
92                 dirmngr.texi scdaemon.texi tools.texi wks.texi \
93                 gpg-card.texi
94 myman_pages   = gpgsm.1 gpg-agent.1 dirmngr.8 scdaemon.1 \
95                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
96                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 gpgtar.1 \
97                 applygnupgdefaults.8 gpg-wks-client.1 gpg-wks-server.1 \
98                 dirmngr-client.1 gpg-card.1
99 if USE_GPG2_HACK
100 myman_pages += gpg2.1 gpgv2.1
101 else
102 myman_pages += gpg.1 gpgv.1
103 endif
104
105 man_MANS = $(myman_pages) gnupg.7
106
107 watchgnupg_SOURCE = gnupg.texi
108
109
110 CLEANFILES = yat2m mkdefsinc defs.inc
111
112 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
113                  gnupg-card-architecture.eps \
114                  gnupg-module-overview.eps \
115                  $(myman_pages) gnupg.7
116
117 yat2m: yat2m.c
118         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
119
120 mkdefsinc: mkdefsinc.c Makefile ../config.h
121         $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \
122                         -o $@ $(srcdir)/mkdefsinc.c
123
124 .svg.eps:
125         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
126
127 .svg.png:
128         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
129
130 .svg.pdf:
131         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
132
133 .fig.png:
134         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
135
136 .fig.jpg:
137         fig2dev -L jpeg `test -f '$<' || echo '$(srcdir)/'`$< $@
138
139 .fig.eps:
140         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
141
142 .fig.pdf:
143         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
144
145
146 yat2m-stamp: $(myman_sources) defs.inc
147         @rm -f yat2m-stamp.tmp
148         @touch yat2m-stamp.tmp
149         incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \
150         for file in $(myman_sources) ; do \
151               $(YAT2M) $(YAT2M_OPTIONS) --store \
152                   --date "`cat $$incd 2>/dev/null`" \
153                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
154         @mv -f yat2m-stamp.tmp $@
155
156 yat2m-stamp: $(YAT2M)
157
158 $(myman_pages) gnupg.7 : yat2m-stamp defs.inc
159         @if test -f $@; then :; else \
160             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
161                if mkdir yat2m-lock 2>/dev/null; then \
162                  rm -f yat2m-stamp; \
163                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
164                  rmdir yat2m-lock; \
165                else \
166                  while test -d yat2m-lock; do sleep 1; done; \
167                  test -f yat2m-stamp; exit $$?; \
168                fi; \
169              fi
170
171 dist-hook: defsincdate
172
173 defsincdate: $(gnupg_TEXINFOS)
174         : >defsincdate ; \
175         if test -e $(top_srcdir)/.git; then \
176           (cd $(srcdir) && git log -1 --format='%ct' \
177                -- $(gnupg_TEXINFOS) 2>/dev/null) >>defsincdate; \
178         fi
179
180 defs.inc : defsincdate Makefile mkdefsinc
181         incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \
182         ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \
183             $(gnupg_TEXINFOS) >$@
184
185
186 online: gnupg.html gnupg.pdf gnupg-module-overview.png \
187            gnupg-card-architecture.png
188         set -e; \
189         echo "Uploading current manuals to www.gnupg.org ..."; \
190         cp $(srcdir)/gnupg-logo-tr.png gnupg.html/; \
191         cp gnupg-module-overview.png gnupg.html/; \
192         cp gnupg-card-architecture.png gnupg.html/; \
193         user=werner ; webhost="ftp.gnupg.org" ; dashdevel="" ; \
194         if echo "@PACKAGE_VERSION@" | grep -- "-beta" >/dev/null; then \
195           dashdevel="-devel" ; \
196         else \
197           rsync -v gnupg.pdf $${user}@$${webhost}:webspace/manuals/ ; \
198         fi ; \
199         cd gnupg.html ; \
200         rsync -vr --exclude='.git' .  \
201           $${user}@$${webhost}:webspace/manuals/gnupg$${dashdevel}/