9caeffd08da383e56e3e94f88bf259ea62f31337
[gpg4win.git] / doc / manual / Makefile.am
1 # Makefile.am - Building the manuals
2 # Copyright (C) 2005, 2008 g10 Code GmbH
3
4 # This file is part of GPG4Win.
5
6 # GPG4Win is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GPG4Win is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20
21 png_files = \
22                 sc-kleopatra-startmenu_de.png\
23                 sc-kleopatra-mainwindow-empty_de.png\
24                 sc-kleopatra-ChooseCertificateFormat_de.png\
25                 sc-kleopatra-openpgp-personalDetails_de.png\
26                 sc-kleopatra-openpgp-reviewParameters_de.png\
27                 sc-kleopatra-openpgp-createKey_de.png\
28                 sc-kleopatra-openpgp-pinentry_de.png\
29                 sc-kleopatra-openpgp-keyPairCreated_de.png\
30                 sc-kleopatra-openpgp-exportSecretKey_de.png\
31                 sc-kleopatra-withOpenpgpTestkey_de.png\
32                 sc-kleopatra-withAdeleKey_de.png\
33                 sc-kleopatra-openpgp-certificateDetails_de.png\
34                 sc-kleopatra-x509-personalDetails_de.png\
35                 sc-kleopatra-x509-reviewParameters_de.png\
36                 sc-kleopatra-x509-createKey_de.png\
37                 sc-kleopatra-x509-pinentry_de.png\
38                 sc-kleopatra-x509-keyPairCreated_de.png\
39                 sc-kleopatra-exportCertificateToServer_de.png\
40                 sc-kleopatra-certificateSearchOnKeyserver_de.png\
41                 sc-kleopatra-verifySignedMail_de.png \
42                 sc-kleopatra-certifyCertificate1_de.png \
43                 sc-kleopatra-certifyCertificate2_de.png \
44                 sc-kleopatra-certifyCertificate3_de.png \
45                 sc-kleopatra-configureKeyserver_de.png\
46                 sc-ol-adele-sendOpenpgpKey-inline_de.png\
47                 sc-ol-adele-sendOpenpgpKey-attachment_de.png\
48                 sc-kleopatra-import-certificate_de.png\
49                 sc-kleopatra-import-openpgp-secret-key_de.png\
50                 sc-kleopatra-encryption-chooseOpenpgpCertificate_de.png\
51                 sc-kleopatra-encryption-successful_de.png\
52                 sc-kleopatra-format-choice_de.png\
53                 sc-kleopatra-sign-selectCertificate_de.png\
54                 sc-kleopatra-encrypt-selectCertificate_de.png\
55                 sc-ol-sendEncryptedMail_de.png\
56                 sc-ol-sendSignedMail_de.png\
57                 sc-gpgol-options_de.png\
58                 sc-gpgol-options-textformat_de.png\
59                 sc-kleopatra-sign-OpenpgpPinentry_de.png\
60                 sc-kleopatra-sign-successful_de.png\
61                 sc-kleopatra-encryptFile1_de.png\
62                 sc-kleopatra-encryptFile2_de.png\
63                 sc-kleopatra-encryptFile3_de.png\
64                 sc-kleopatra-signFile1_de.png\
65                 sc-kleopatra-signFile2_de.png\
66                 sc-kleopatra-signFile3_de.png\
67                 sc-kleopatra-decryptFile1_de.png\
68                 sc-kleopatra-decryptFile2_de.png\
69                 sc-kleopatra-verifyFile1_de.png\
70                 sc-kleopatra-verifyFile2_de.png\
71                 sc-kleopatra-verifyFile2a-badSignature_de.png\
72                 sc-gpgex-contextmenu-signEncrypt_de.png\
73                 sc-gpgex-contextmenu-verifyDecrypt_de.png\
74                 sc-wordpad-editOpenpgpKey_de.png\
75                 sc-pinentry-p12-import-a_de.png\
76                 sc-pinentry-p12-import-b_de.png\
77                 sc-inst-language_de.png\
78                 \
79                 sc-inst-welcome_de.png\
80                 sc-inst-welcome.png sc-inst-license_de.png \
81                 sc-inst-components_de.png sc-inst-directory_de.png \
82                 sc-inst-options_de.png \
83                 sc-inst-startmenu_de.png sc-inst-ready_de.png \
84                 sc-inst-progress_de.png \
85                 sc-inst-finished_de.png sc-inst-finished2_de.png \
86                 sc-inst-finished2.png\
87                 sc-winpt-sign-passwd.png \
88                 sc-gpgee-ctxmenu.png sc-gpgee-signmenu.png \
89                 sc-gpa-gen-backup.png sc-gpa-gen-backup-warn.png \
90                 sc-gpgol-options.png sc-gpgol-noword.png \
91                 sc-en-inst-welcome.png sc-en-inst-license.png \
92                 sc-en-inst-components.png sc-en-inst-directory.png \
93                 sc-en-inst-options.png \
94                 sc-en-inst-startmenu.png sc-en-inst-ready.png \
95                 sc-en-inst-finished.png \
96                 sc-en-gpa-gen-backup.png sc-en-gpa-gen-backup-warn.png \
97                 sc-en-gpa-first-key.png sc-en-gpa-gen-email.png \
98                 sc-en-gpa-gen-name.png sc-en-gpa-gen-passwd.png \
99                 sc-en-gpa-ks-export-p.png sc-en-gpa-nokey.png \
100                 sc-en-gpa-rungpa.png sc-en-gpa-two-keys.png \
101                 openpgp-icon.png smime-icon.png \
102                 verleihnix.png
103
104 web_png_files = blank.png next.png previous.png up.png \
105                 home.png nonext.png noprevious.png noup.png
106
107
108 eps_files = adele01.eps.gz adele02.eps.gz man-with-signed-key.eps.gz \
109             egyptian-stone.eps.gz sealed-envelope.eps.gz \
110             schlapphut-with-key.eps.gz tangled-schlapphut.eps.gz \
111             key-with-shadow-bit.eps.gz \
112             letter-into-safe.eps.gz letter-out-of-safe.eps.gz \
113             secret-key-exchange.eps.gz pk-safe-open.eps.gz \
114             pk-safe-opened-with-sk.eps.gz think-passphrase.eps.gz \
115             keyserver-world.eps.gz key-with-sigs.eps.gz \
116             clock-face.eps.gz mileage-indicator.eps.gz \
117             table-1.eps.gz table-2.eps.gz table-3.eps.gz \
118             sc-gpa-first-key.eps.gz \
119             sc-gpa-gen-email.eps.gz sc-gpa-gen-name.eps.gz \
120             sc-gpa-gen-passwd.eps.gz sc-gpa-nokey.eps.gz \
121             sc-gpa-rungpa.eps.gz sc-gpa-ks-export-p.eps.gz \
122             sc-gpa-two-keys.eps.gz \
123             sc-ol-send-test-key.eps.gz sc-ol-send-enc-msg1.eps.gz \
124             sc-ol-send-enc-msg2.eps.gz \
125             sc-gpgol-set-icon.eps.gz \
126             sc-winpt-startmenu.eps.gz sc-winpt-trayicon.eps.gz \
127             sc-winpt-clip-decrypt.eps.gz sc-winpt-good-sig.eps.gz \
128             sc-winpt-sel-enc-key.eps.gz sc-winpt-enctoself.eps.gz \
129             sc-misc-mein-key-asc.eps.gz
130
131 eps_files_bb  = $(eps_files:.gz=.bb)
132 eps_files_png  = $(eps_files:.eps.gz=.png)
133 #eps_files_pdf = $(eps_files:.eps.gz=.pdf)
134 png_files_eps = $(png_files:.png=.eps) 
135
136 EXTRA_DIST = fdl.tex fdl-book.tex gpg4win-compendium-de.tex \
137              einsteiger.tex durchblicker.tex novices.tex \
138              $(eps_files) $(png_files) $(web_png_files) \
139              was-ist-gpg4win.tex what-is-gpg4win.tex \
140              macros.tex macros-en.tex version.tex.in \
141              gpg4win-logo.eps gpg4win-logo.png
142 # advanced.tex
143
144 CLEANFILES = $(eps_files_bb) $(png_files_eps) \
145              *.dvi *.pdf *.pdf *.toc *.log *.aux *.out \
146              *.html.d-stamp  *.html.d/*
147 DISTCLEANFILES = version.tex $(eps_files_png)
148
149 pkgdata_DATA = gpg4win-compendium-de.pdf novices.pdf 
150 # advanced.pdf
151
152 BUILT_SOURCES = $(eps_files_bb) $(png_files_eps) $(eps_files_png)
153
154 all-local: gpg4win-compendium-de.pdf novices.pdf \
155            gpg4win-compendium-de.html.d-stamp
156 # advanced.pdf
157
158
159 gpg4win-compendium-de.pdf : $(eps_files_bb) $(png_files_eps) $(eps_files_png)
160 gpg4win-compendium-de.dvi : version.tex macros.tex $(eps_files_bb)
161 gpg4win-compendium-de.html.d-stamp : version.tex macros.tex $(eps_files_png) $(web_png_files)
162 einsteiger.pdf : $(eps_files_bb) $(png_files_eps) $(eps_files_png)
163 einsteiger.dvi : version.tex macros.tex $(eps_files_bb)
164 einsteiger.html.d-stamp : version.tex macros.tex $(eps_files_png)
165 durchblicker.pdf : $(eps_files_bb) $(png_files_eps) $(eps_files_png)
166 durchblicker.dvi : version.tex macros.tex $(eps_files_bb)
167 durchblicker.html.d-stamp : version.tex macros.tex $(eps_files_png)
168 novices.pdf : $(eps_files_bb) $(png_files_eps) $(eps_files_png)
169 novices.dvi : version.tex macros-en.tex $(eps_files_bb) $(eps_files_png)
170 novices.html.d-stamp : version.tex macros-en.tex $(eps_files_png)
171 #advanced.pdf : $(eps_files_bb) $(png_files_eps) $(eps_files_png)
172 #advanced.dvi : version.tex macros-en.tex $(eps_files_bb)
173 #advanced.html : version.tex macros-en.tex $(eps_files_png)
174
175 online: gpg4win-compendium-de.html.d-stamp novices.html.d-stamp
176         set -e; \
177         echo "Going to put current manuals online for www.gpg4win.org ..."; \
178         user=`svn info | sed -n '/^URL:/ s,.*svn+ssh://\\([^@]*\\).*,\\1,p'`;\
179         for d in $^; do \
180           (x=$$(echo $$d | sed  's/.d-stamp$$/.d/') ;\
181            echo "Cding to: $$x";\
182            cd $$x ;\
183            rsync -v * \
184              $${user}@wald.intevation.org:/gpg4win/htdocs/handbuecher/ ); \
185         done
186
187
188 preview: gpg4win-compendium-de.html.d-stamp novices.html.d-stamp
189         set -e; \
190         echo "Rsyncing the HTML manuals to the preview host ..."; \
191         for d in $^; do \
192           (x=$$(echo $$d | sed  's/.d-stamp$$/.d/') ;\
193            echo "cd to $$x" ;\
194            cd $$x ;\
195            rsync -v * ${PREVIEWHOST}/ ) ;\
196         done
197
198 %.eps.bb : %.eps.gz
199         $(ZCAT) `test -f '$<' || echo '$(srcdir)/'`$< \
200           | grep '^%%BoundingBox' | head -1 > $@
201
202 %.eps : %.png
203         $(CONVERT) `test -f '$<' || echo '$(srcdir)/'`$< $@
204
205 %.png : %.eps.gz
206         $(CONVERT) -density 100x100 `test -f '$<' || echo '$(srcdir)/'`$< $@
207
208 %.dvi : %.tex
209         $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< 
210
211 %.pdf : %.dvi
212         TEXPICTS=$(srcdir) $(DVIPDF)  $< $@
213
214 #%.pdf : %.eps.gz
215 #       $(ZCAT) `test -f '$<' || echo '$(srcdir)/'`$< \
216 #         | epstopdf -f > $@
217
218 # The html.d directories are used to collect all relevant files for
219 # the NSI scripts.  This is also required because hyperlatex is not
220 # able to work in VPATH environment. 
221 %.html.d-stamp : %.tex
222         @rm -f $@.tmp
223         @touch $@.tmp
224         set -e; LC_CTYPE=C; export LC_CTYPE; \
225          src=$$(test -f '$<' || echo '$(srcdir)/')$< ; \
226          wdir=$$(echo $@ | sed  's/.d-stamp$$/.d/') ; \
227          rm -rf $$wdir || true;\
228          mkdir $$wdir;\
229          files=$$( (echo $$src; \
230             sed -n 's/.*\\IncludeImage\[.*\]{\([^}]*\).*/\1.png/p' $$src;\
231             sed -n 's/.*\\IncludeImage{\([^}]*\).*/\1.png/p' $$src ;\
232             sed -n 's/.*\\input{\([^}]*\).*/\1/p' $$src ) \
233           | sort | uniq) ;\
234          for f in $$files $(web_png_files); do \
235            if [ -f "$$f" ]; then cp "$$f" $$wdir ;\
236            elif [ -f "$(srcdir)/$$f" ]; then cp "$(srcdir)/$$f" $$wdir ;\
237            fi ;\
238          done ;\
239          cd $$wdir ;\
240          hyperlatex $$(basename $$src) ;\
241          for f in $$files; do \
242             x=$$(basename "$$f") ;\
243             case $$x in *.png) : ;; *) rm -f $$x ;; esac ;\
244          done
245         @mv -f $@.tmp $@