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