Switched latex build to pdflatex. Converted eps files to png. Update
[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 PDFLATEX = pdflatex
21
22 png_files = \
23                 sc-kleopatra-startmenu_de.png\
24                 sc-kleopatra-mainwindow-empty_de.png\
25                 sc-kleopatra-ChooseCertificateFormat_de.png\
26                 sc-kleopatra-openpgp-personalDetails_de.png\
27                 sc-kleopatra-openpgp-reviewParameters_de.png\
28                 sc-kleopatra-openpgp-createKey_de.png\
29                 sc-kleopatra-openpgp-pinentry_de.png\
30                 sc-kleopatra-openpgp-keyPairCreated_de.png\
31                 sc-kleopatra-openpgp-exportSecretKey_de.png\
32                 sc-kleopatra-withOpenpgpTestkey_de.png\
33                 sc-kleopatra-withAdeleKey_de.png\
34                 sc-kleopatra-openpgp-certificateDetails_de.png\
35                 sc-kleopatra-x509-personalDetails_de.png\
36                 sc-kleopatra-x509-reviewParameters_de.png\
37                 sc-kleopatra-x509-createKey_de.png\
38                 sc-kleopatra-x509-pinentry_de.png\
39                 sc-kleopatra-x509-keyPairCreated_de.png\
40                 sc-kleopatra-exportCertificateToServer_de.png\
41                 sc-kleopatra-certificateSearchOnKeyserver_de.png\
42                 sc-kleopatra-verifySignedMail_de.png \
43                 sc-kleopatra-certifyCertificate1_de.png \
44                 sc-kleopatra-certifyCertificate2_de.png \
45                 sc-kleopatra-certifyCertificate3_de.png \
46                 sc-kleopatra-configureKeyserver_de.png\
47                 sc-ol-adele-sendOpenpgpKey-inline_de.png\
48                 sc-ol-adele-sendOpenpgpKey-attachment_de.png\
49                 sc-kleopatra-import-certificate_de.png\
50                 sc-kleopatra-import-openpgp-secret-key_de.png\
51                 sc-kleopatra-encryption-chooseOpenpgpCertificate_de.png\
52                 sc-kleopatra-encryption-successful_de.png\
53                 sc-kleopatra-format-choice_de.png\
54                 sc-kleopatra-sign-selectCertificate_de.png\
55                 sc-kleopatra-encrypt-selectCertificate_de.png\
56                 sc-ol-sendEncryptedMail_de.png\
57                 sc-ol-sendSignedMail_de.png\
58                 sc-gpgol-options_de.png\
59                 sc-gpgol-options-textformat_de.png\
60                 sc-kleopatra-sign-OpenpgpPinentry_de.png\
61                 sc-kleopatra-sign-successful_de.png\
62                 sc-kleopatra-encryptFile1_de.png\
63                 sc-kleopatra-encryptFile2_de.png\
64                 sc-kleopatra-encryptFile3_de.png\
65                 sc-kleopatra-signFile1_de.png\
66                 sc-kleopatra-signFile2_de.png\
67                 sc-kleopatra-signFile3_de.png\
68                 sc-kleopatra-decryptFile1_de.png\
69                 sc-kleopatra-decryptFile2_de.png\
70                 sc-kleopatra-verifyFile1_de.png\
71                 sc-kleopatra-verifyFile2_de.png\
72                 sc-kleopatra-verifyFile2a-badSignature_de.png\
73                 sc-gpgex-contextmenu-signEncrypt_de.png\
74                 sc-gpgex-contextmenu-verifyDecrypt_de.png\
75                 sc-wordpad-editOpenpgpKey_de.png\
76                 sc-pinentry-p12-import-a_de.png\
77                 sc-pinentry-p12-import-b_de.png\
78                 sc-inst-language_de.png\
79                 sc-inst-welcome_de.png\
80                 sc-inst-license_de.png \
81                 sc-inst-components_de.png \
82                 sc-inst-directory_de.png \
83                 sc-inst-options_de.png \
84                 sc-inst-startmenu_de.png \
85                 sc-inst-ready_de.png \
86                 sc-inst-progress_de.png \
87                 sc-inst-finished_de.png \
88                 sc-inst-finished2_de.png \
89                 openpgp-icon.png \
90                 smime-icon.png \
91                 \
92                 adele01.png \
93                 adele02.png \
94                 clock-face.png \
95                 egyptian-stone.png \
96                 keyserver-world.png \
97                 key-with-shadow-bit.png \
98                 key-with-sigs.png \
99                 letter-into-safe.png \
100                 letter-out-of-safe.png \
101                 man-with-signed-key.png \
102                 mileage-indicator.png \
103                 pk-safe-opened-with-sk.png \
104                 pk-safe-open.png \
105                 schlapphut-with-key.png \
106                 sealed-envelope.png \
107                 secret-key-exchange.png \
108                 tangled-schlapphut.png \
109                 think-passphrase.png \
110                 verleihnix.png \
111                 \
112                 table-1.png table-2.png table-3.png \
113         sc-gpa-first-key.png \
114         sc-gpa-gen-email.png sc-gpa-gen-name.png \
115         sc-gpa-gen-passwd.png sc-gpa-nokey.png \
116         sc-gpa-rungpa.png sc-gpa-ks-export-p.png \
117         sc-gpa-two-keys.png \
118         sc-ol-send-test-key.png sc-ol-send-enc-msg1.png \
119         sc-ol-send-enc-msg2.png \
120         sc-gpgol-set-icon.png \
121         sc-winpt-startmenu.png sc-winpt-trayicon.png \
122                 sc-winpt-clip-decrypt.png sc-winpt-good-sig.png \
123         sc-winpt-sel-enc-key.png sc-winpt-enctoself.png \
124                 sc-misc-mein-key-asc.png \
125                 sc-inst-welcome.png \
126                 sc-inst-finished2.png \
127                 sc-winpt-sign-passwd.png \
128                 sc-gpgee-ctxmenu.png \
129                 sc-gpgee-signmenu.png \
130                 sc-gpa-gen-backup.png \
131                 sc-gpa-gen-backup-warn.png \
132                 sc-gpgol-options.png \
133                 sc-gpgol-noword.png \
134                 sc-en-inst-welcome.png \
135                 sc-en-inst-license.png \
136                 sc-en-inst-components.png \
137                 sc-en-inst-directory.png \
138                 sc-en-inst-options.png \
139                 sc-en-inst-startmenu.png \
140                 sc-en-inst-ready.png \
141                 sc-en-inst-finished.png \
142                 sc-en-gpa-gen-backup.png \
143                 sc-en-gpa-gen-backup-warn.png \
144                 sc-en-gpa-first-key.png \
145                 sc-en-gpa-gen-email.png \
146                 sc-en-gpa-gen-name.png \
147                 sc-en-gpa-gen-passwd.png \
148                 sc-en-gpa-ks-export-p.png \
149                 sc-en-gpa-nokey.png \
150                 sc-en-gpa-rungpa.png \
151                 sc-en-gpa-two-keys.png
152
153 web_png_files = blank.png next.png previous.png up.png \
154                 home.png nonext.png noprevious.png noup.png
155
156 eps_files = $(png_files:.png=.eps)
157
158
159 EXTRA_DIST = gpg4win-compendium-de.tex \
160                                 fdl.tex fdl-book.tex version.tex.in  \
161                                 $(eps_files) $(png_files) $(web_png_files) \
162                                 gpg4win-logo.eps gpg4win-logo.png \
163                                 # needed for Englisch novices manual:
164                         novices.tex what-is-gpg4win.tex macros-en.tex \
165                                 # needed for (old) German manuals: \
166                                 # einsteiger.tex durchblicker.tex was-ist-gpg4win.tex macros.tex
167
168 CLEANFILES = $(eps_files) \
169              *.dvi *.pdf *.pdf *.toc *.log *.aux *.out \
170                  *.html.d-stamp  *.html.d/*
171 DISTCLEANFILES = version.tex
172
173 pkgdata_DATA =  gpg4win-compendium-de.pdf \
174                                 novices.pdf 
175
176 BUILT_SOURCES = $(png_files) 
177
178 all-local:      gpg4win-compendium-de.pdf \
179                         gpg4win-compendium-de.html.d-stamp \
180                         novices.pdf
181
182 gpg4win-compendium-de.pdf : version.tex
183 gpg4win-compendium-de.dvi : eps version.tex
184 gpg4win-compendium-de.html.d-stamp : version.tex 
185 einsteiger.dvi : version.tex macros.tex $(eps_files)
186 einsteiger.html.d-stamp : version.tex macros.tex $(eps_files)
187 durchblicker.dvi : version.tex macros.tex $(eps_files)
188 durchblicker.html.d-stamp : version.tex macros.tex 
189 novices.dvi : version.tex macros-en.tex $(eps_files)
190 novices.html.d-stamp : version.tex macros-en.tex 
191
192
193 %.eps : %.png
194         $(CONVERT) $< eps2:$@
195
196 eps: $(eps_files)
197
198 %.dvi : %.tex 
199         $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< 
200
201 %.pdf : %.tex
202         $(PDFLATEX) $<
203
204 pdf-de: gpg4win-compendium-de.pdf
205
206 dvi-de: gpg4win-compendium-de.dvi
207
208 html-de: gpg4win-compendium-de.html.d-stamp
209
210 # The html.d directories are used to collect all relevant files for
211 # the NSI scripts.  This is also required because hyperlatex is not
212 # able to work in VPATH environment. 
213 %.html.d-stamp : %.tex
214         @rm -f $@.tmp
215         @touch $@.tmp
216         set -e; LC_CTYPE=C; export LC_CTYPE; \
217          src=$$(test -f '$<' || echo '$(srcdir)/')$< ; \
218          wdir=$$(echo $@ | sed  's/.d-stamp$$/.d/') ; \
219          rm -rf $$wdir || true;\
220          mkdir $$wdir;\
221          files=$$( (echo $$src; \
222             sed -n 's/.*\\IncludeImage\[.*\]{\([^}]*\).*/\1.png/p' $$src;\
223             sed -n 's/.*\\IncludeImage{\([^}]*\).*/\1.png/p' $$src ;\
224             sed -n 's/.*\\input{\([^}]*\).*/\1/p' $$src ) \
225           | sort | uniq) ;\
226          for f in $$files $(web_png_files); do \
227            if [ -f "$$f" ]; then cp "$$f" $$wdir ;\
228            elif [ -f "$(srcdir)/$$f" ]; then cp "$(srcdir)/$$f" $$wdir ;\
229            fi ;\
230          done ;\
231          cd $$wdir ;\
232          hyperlatex $$(basename $$src) ;\
233          for f in $$files; do \
234             x=$$(basename "$$f") ;\
235             case $$x in *.png) : ;; *) rm -f $$x ;; esac ;\
236          done
237         @mv -f $@.tmp $@
238
239 online: gpg4win-compendium-de.html.d-stamp novices.html.d-stamp
240         set -e; \
241         echo "Going to put current manuals online for www.gpg4win.org ..."; \
242         user=`svn info | sed -n '/^URL:/ s,.*svn+ssh://\\([^@]*\\).*,\\1,p'`;\
243         for d in $^; do \
244           (x=$$(echo $$d | sed  's/.d-stamp$$/.d/') ;\
245            echo "Cding to: $$x";\
246            cd $$x ;\
247            rsync -v * \
248              $${user}@wald.intevation.org:/gpg4win/htdocs/handbuecher/ ); \
249         done
250
251 preview: gpg4win-compendium-de.html.d-stamp novices.html.d-stamp
252         set -e; \
253         echo "Rsyncing the HTML manuals to the preview host ..."; \
254         for d in $^; do \
255           (x=$$(echo $$d | sed  's/.d-stamp$$/.d/') ;\
256            echo "cd to $$x" ;\
257            cd $$x ;\
258            rsync -v * ${PREVIEWHOST}/ ) ;\
259         done