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