gpg: Add list-option "show-usage".
[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 mksamplekeys \
32              gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png gnupg-logo-tr.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 ChangeLog-2011
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 DCO TRANSLATE OpenPGP KEYSERVER \
47                        $(examples)
48
49 #dist_html_DATA =
50
51
52 gnupg_TEXINFOS = \
53         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi instguide.texi \
54         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
55         sysnotes.texi gnupg-card-architecture.fig dirmngr.texi \
56         howtos.texi howto-create-a-server-cert.texi
57
58 DVIPS = TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" dvips
59
60 AM_MAKEINFOFLAGS = -I $(srcdir) --css-ref=/share/site.css -D gpgtwoone
61
62 YAT2M_OPTIONS = -I $(srcdir) -D gpgtwoone \
63         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard"
64
65 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
66                 dirmngr.texi scdaemon.texi tools.texi
67 myman_pages   = gpg2.1 gpgsm.1 gpg-agent.1 dirmngr.8 scdaemon.1 gpgv2.1 \
68                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
69                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
70                 gpgsm-gencert.sh.1 applygnupgdefaults.8 gpg-zip.1 \
71                 dirmngr-client.1
72
73 man_MANS = $(myman_pages) gnupg.7
74
75 watchgnupg_SOURCE = gnupg.texi
76
77
78 CLEANFILES = yat2m faq.txt faq.html
79
80 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
81                  $(myman_pages) gnupg.7
82
83 yat2m: yat2m.c
84         $(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
85
86
87 .fig.png:
88         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
89
90 .fig.jpg:
91         fig2dev -L jpeg `test -f '$<' || echo '$(srcdir)/'`$< $@
92
93 .fig.eps:
94         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
95
96 .fig.pdf:
97         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
98
99
100 yat2m-stamp: $(myman_sources)
101         @rm -f yat2m-stamp.tmp
102         @touch yat2m-stamp.tmp
103         for file in $(myman_sources) ; do \
104               ./yat2m $(YAT2M_OPTIONS) --store \
105                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
106         @mv -f yat2m-stamp.tmp $@
107
108 yat2m-stamp: yat2m
109
110 $(myman_pages) gnupg.7 : yat2m-stamp
111         @if test -f $@; then :; else \
112             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
113                if mkdir yat2m-lock 2>/dev/null; then \
114                  rm -f yat2m-stamp; \
115                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
116                  rmdir yat2m-lock; \
117                else \
118                  while test -d yat2m-lock; do sleep 1; done; \
119                  test -f yat2m-stamp; exit $$?; \
120                fi; \
121              fi
122
123 # Make sure that gnupg.texi is touched if any other source file has
124 # been modified.  This is required so that the version.texi magic
125 # updates the release date.
126 gnupg.texi : $(gnupg_TEXINFOS)
127         touch $(srcdir)/gnupg.texi
128
129 online: gnupg.html gnupg.pdf
130         set -e; \
131         echo "Uploading current manuals to www.gnupg.org ..."; \
132         cp $(srcdir)/gnupg-logo-tr.png gnupg.html/; \
133         user=werner ; webhost="ftp.gnupg.org" ; dashdevel="" ; \
134         if echo "@PACKAGE_VERSION@" | grep -- "-git" >/dev/null; then \
135           dashdevel="-devel" ; \
136         else \
137           rsync -v gnupg.pdf $${user}@$${webhost}:webspace/manuals/ ; \
138         fi ; \
139         cd gnupg.html ; \
140         rsync -vr --exclude='.git' .  \
141           $${user}@$${webhost}:webspace/manuals/gnupg$${dashdevel}/
142
143 # Note that you need a recent version of emacs23 with org-mode 7.01h
144 faq.txt faq.html: faq.org
145         @set -e; expopt="t nil nil nil \"$$(pwd)\""; \
146          emacs  --batch \
147           --eval "(require 'org)" \
148           --visit "$(srcdir)/faq.org" \
149           --eval "(setq org-export-ascii-entities 'utf8)" \
150           --eval "(org-export-as-ascii org-export-headline-levels $${expopt})"\
151           --visit "$(srcdir)/faq.org" \
152           --eval "(setq org-export-html-style-include-default nil)" \
153           --eval "(setq org-export-html-style-include-scripts nil)" \
154           --eval "(org-export-as-html org-export-headline-levels $${expopt})"
155
156 faq-online: faq.txt faq.html
157         set -e; \
158         user=werner ; webhost="ftp.gnupg.org" ; ftphost="ftp.gnupg.org" ; \
159         echo "Uploading current FAQ to {www,ftp}.gnupg.org ..."; \
160         scp faq.html $${user}@$${webhost}:webspace/manuals/GnuPG-FAQ.html ; \
161         scp faq.txt  $${user}@$${ftphost}:gcrypt/gnupg/GnuPG-FAQ.txt ; \
162         echo "...ready"