Remove pth dependency
[platform/upstream/gpg2.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/qualified.txt                                       \
26            examples/common.conf                                         \
27            examples/gpgconf.rnames examples/gpgconf.conf                \
28            examples/pwpattern.list
29
30 helpfiles = help.txt help.be.txt help.ca.txt help.cs.txt                \
31             help.da.txt help.de.txt help.el.txt help.eo.txt             \
32             help.es.txt help.et.txt help.fi.txt help.fr.txt             \
33             help.gl.txt help.hu.txt help.id.txt help.it.txt             \
34             help.ja.txt help.nb.txt help.pl.txt help.pt.txt             \
35             help.pt_BR.txt help.ro.txt help.ru.txt help.sk.txt          \
36             help.sv.txt help.tr.txt help.zh_CN.txt help.zh_TW.txt
37
38 EXTRA_DIST = samplekeys.asc mksamplekeys com-certs.pem \
39              gnupg-logo.pdf gnupg-logo.png gnupg-logo-tr.png \
40              gnupg-module-overview.png gnupg-module-overview.pdf \
41              gnupg-card-architecture.png gnupg-card-architecture.pdf \
42              FAQ gnupg7.texi mkdefsinc.c defsincdate \
43              opt-homedir.texi see-also-note.texi specify-user-id.texi \
44              gpgv.texi yat2m.c ChangeLog-2011 whats-new-in-2.1.txt \
45              trust-values.texi
46
47 BUILT_SOURCES = gnupg-module-overview.png gnupg-module-overview.pdf \
48                 gnupg-card-architecture.png gnupg-card-architecture.pdf \
49                 defsincdate defs.inc
50
51 info_TEXINFOS = gnupg.texi
52
53 dist_pkgdata_DATA =  $(helpfiles)
54
55 nobase_dist_doc_DATA = FAQ DETAILS HACKING DCO TRANSLATE OpenPGP KEYSERVER \
56                        $(examples)
57
58 #dist_html_DATA =
59
60
61 gnupg_TEXINFOS = \
62         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
63         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
64         sysnotes.texi dirmngr.texi wks.texi gpg-card.texi \
65         gnupg-module-overview.svg \
66         gnupg-card-architecture.fig \
67         howtos.texi howto-create-a-server-cert.texi
68
69 gnupg.texi : defs.inc
70
71
72 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
73
74 AM_MAKEINFOFLAGS = -I $(srcdir) --css-ref=/share/site.css
75
76 YAT2M_OPTIONS = -I $(srcdir) \
77         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard 2.4"
78
79 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
80                 dirmngr.texi scdaemon.texi tools.texi wks.texi \
81                 gpg-card.texi
82 myman_pages   = gpgsm.1 gpg-agent.1 dirmngr.8 scdaemon.1 \
83                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
84                 gpg-connect-agent.1 gpgparsemail.1 gpgtar.1 \
85                 applygnupgdefaults.8 gpg-wks-client.1 gpg-wks-server.1 \
86                 dirmngr-client.1 gpg-card.1 gpg-check-pattern.1
87 if USE_GPG2_HACK
88 myman_pages += gpg2.1 gpgv2.1
89 else
90 myman_pages += gpg.1 gpgv.1
91 endif
92
93 man_MANS = $(myman_pages) gnupg.7
94
95 watchgnupg_SOURCE = gnupg.texi
96
97
98 CLEANFILES = yat2m mkdefsinc defs.inc
99
100 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
101                  $(myman_pages) gnupg.7
102
103 yat2m: yat2m.c
104         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
105
106 mkdefsinc: mkdefsinc.c Makefile ../config.h
107         $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \
108                         -o $@ $(srcdir)/mkdefsinc.c
109
110 if MAINTAINER_MODE
111 .svg.eps:
112         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
113
114 .svg.png:
115         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
116
117 .svg.pdf:
118         convert `test -f '$<' || echo '$(srcdir)/'`$< $@
119
120 .fig.png:
121         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
122
123 .fig.jpg:
124         fig2dev -L jpeg `test -f '$<' || echo '$(srcdir)/'`$< $@
125
126 .fig.eps:
127         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
128
129 .fig.pdf:
130         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
131 endif
132
133
134 yat2m-stamp: $(myman_sources) defs.inc
135         @rm -f yat2m-stamp.tmp
136         @touch yat2m-stamp.tmp
137         incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \
138         for file in $(myman_sources) ; do \
139               $(YAT2M) $(YAT2M_OPTIONS) --store \
140                   --date "`cat $$incd 2>/dev/null`" \
141                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
142         @mv -f yat2m-stamp.tmp $@
143
144 yat2m-stamp: $(YAT2M)
145
146 $(myman_pages) gnupg.7 : yat2m-stamp defs.inc
147         @if test -f $@; then :; else \
148             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
149                if mkdir yat2m-lock 2>/dev/null; then \
150                  rm -f yat2m-stamp; \
151                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
152                  rmdir yat2m-lock; \
153                else \
154                  while test -d yat2m-lock; do sleep 1; done; \
155                  test -f yat2m-stamp; exit $$?; \
156                fi; \
157              fi
158
159 dist-hook: defsincdate
160
161 defsincdate: $(gnupg_TEXINFOS)
162         : >defsincdate ; \
163         if test -e $(top_srcdir)/.git; then \
164           (cd $(srcdir) && git log -1 --format='%ct' \
165                -- $(gnupg_TEXINFOS) 2>/dev/null) >>defsincdate; \
166         elif test x"$$SOURCE_DATE_EPOCH" != x; then   \
167            echo "$$SOURCE_DATE_EPOCH" >>defsincdate ; \
168         fi
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}/