1 ### Makefile for Emacs refcards
3 ## Copyright (C) 1993-1994, 2001-2013 Free Software Foundation, Inc.
5 ## This file is part of GNU Emacs.
7 ## GNU Emacs is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
12 ## GNU Emacs is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
17 ## You should have received a copy of the GNU General Public License
18 ## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 ## See README for details.
45 PDF_GERMAN
= de-refcard.pdf
47 PDF_POLISH
= pl-refcard.pdf
49 PDF_PORTUGUESE
= pt-br-refcard.pdf
51 PDF_RUSSIAN
= ru-refcard.pdf
58 PDF_TARGETS
= $(PDF_ENGLISH
) $(PDF_CZECH
) $(PDF_FRENCH
) $(PDF_GERMAN
) \
59 $(PDF_POLISH
) $(PDF_PORTUGUESE
) $(PDF_RUSSIAN
) $(PDF_SLOVAKIAN
)
82 PS_GERMAN
= de-refcard.ps
84 PS_POLISH
= pl-refcard.ps
86 PS_PORTUGUESE
= pt-br-refcard.ps
88 PS_RUSSIAN
= ru-refcard.ps
95 PS_TARGETS
= $(PS_ENGLISH
) $(PS_CZECH
) $(PS_FRENCH
) $(PS_GERMAN
) \
96 $(PS_POLISH
) $(PS_PORTUGUESE
) $(PS_RUSSIAN
) $(PS_SLOVAKIAN
)
100 ENVADD
= TEXINPUTS
=".:$(TEXINPUTS)"
110 .PHONY
: english czech french german polish portuguese russian slovakian
111 english
: $(PDF_ENGLISH
)
113 french
: $(PDF_FRENCH
)
114 german
: $(PDF_GERMAN
)
115 polish
: $(PDF_POLISH
)
116 portuguese
: $(PDF_PORTUGUESE
)
117 russian
: $(PDF_RUSSIAN
)
118 slovakian
: $(PDF_SLOVAKIAN
)
120 .PHONY
: english-ps czech-ps french-ps german-ps polish-ps portuguese-ps russian-ps slovakian-ps
121 english-ps
: $(PS_ENGLISH
)
122 czech-ps
: $(PS_CZECH
)
123 french-ps
: $(PS_FRENCH
)
124 german-ps
: $(PS_GERMAN
)
125 polish-ps
: $(PS_POLISH
)
126 portuguese-ps
: $(PS_PORTUGUESE
)
127 russian-ps
: $(PS_RUSSIAN
)
128 slovakian-ps
: $(PS_SLOVAKIAN
)
131 ## Default for file that do not use a different paper size.
134 dvips
-t letter
-o
$@
$<
137 make_cs
=if pdfcsplain
--version
> /dev
/null
2> /dev
/null
; then \
138 $(ENVADD
) pdfcsplain
$$input; \
140 $(ENVADD
) csplain
"\pdfoutput=1\input $$input"; \
143 ## For pdf output, the page layouts (a4/letter) are written directly
144 ## in the .tex files.
146 ## For PostScript output, note that some of the tex files (refcard,
147 ## de-refcard, fr-refcard, pt-br-refcard) have settings for letter or
148 ## a4 paper. The Following are the default paper sizes (letter for English,
149 ## A4 for translations).
150 ## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
152 ## A4, landscape: de-refcard, fr-refcard, pt-br-refcard orgcard
153 ## A4, portrait: cs-*, fr-dired-ref, sk-*, pl-refcard, ru-refcard
154 ## Letter, landscape: calccard, refcard
155 ## Letter, portrait (suffix rule): diref-ref, gnus-*, survival, vip*
157 calccard_deps
= calccard.
tex emacsver.
tex pdflayout.sty
158 calccard.pdf
: $(calccard_deps
)
159 $(ENVADD
) pdftex calccard.
tex
160 calccard.
dvi: $(calccard_deps
)
161 $(ENVADD
) tex calccard.
tex
162 calccard.ps
: calccard.
dvi
163 dvips
-t letter
-t landscape
-o
$@ calccard.
dvi
165 cs_dired_ref_deps
= cs-dired-ref.
tex emacsver.
tex pdflayout.sty
166 cs-dired-ref.pdf
: $(cs_dired_ref_deps
)
167 input
=cs-dired-ref.
tex; $(make_cs
)
168 cs-dired-ref.
dvi: $(cs_dired_ref_deps
)
169 $(ENVADD
) csplain cs-dired-ref.
tex
170 cs-dired-ref.ps
: cs-dired-ref.
dvi
171 dvips
-t a4
-o
$@ cs-dired-ref.
dvi
173 cs_refcard_deps
= cs-refcard.
tex emacsver.
tex pdflayout.sty
174 cs-refcard.pdf
: $(cs_refcard_deps
)
175 input
=cs-refcard.
tex; $(make_cs
)
176 cs-refcard.
dvi: $(cs_refcard_deps
)
177 $(ENVADD
) csplain cs-refcard.
tex
178 cs-refcard.ps
: cs-refcard.
dvi
179 dvips
-t a4
-o
$@ cs-refcard.
dvi
181 cs_survival_deps
= cs-survival.
tex emacsver.
tex pdflayout.sty
182 cs-survival.pdf
: $(cs_survival_deps
)
183 input
=cs-survival.
tex; $(make_cs
)
184 cs-survival.
dvi: $(cs_survival_deps
)
185 $(ENVADD
) csplain cs-survival.
tex
186 cs-survival.ps
: cs-survival.
dvi
187 dvips
-t a4
-o
$@ cs-survival.
dvi
189 de_refcard_deps
= de-refcard.
tex emacsver.
tex pdflayout.sty
190 de-refcard.pdf
: $(de_refcard_deps
)
191 $(ENVADD
) pdftex de-refcard.
tex
192 de-refcard.
dvi: $(de_refcard_deps
)
193 $(ENVADD
) tex de-refcard.
tex
194 de-refcard.ps
: de-refcard.
dvi
195 dvips
-t a4
-t landscape
-o
$@ de-refcard.
dvi
197 dired_ref_deps
= dired-ref.
tex emacsver.
tex pdflayout.sty
198 dired-ref.pdf
: $(dired_ref_deps
)
199 $(ENVADD
) pdftex dired-ref.
tex
200 dired-ref.
dvi: $(dired_ref_deps
)
201 $(ENVADD
) tex dired-ref.
tex
203 fr_dired_ref_deps
= fr-dired-ref.
tex emacsver.
tex pdflayout.sty
204 fr-dired-ref.pdf
: $(fr_dired_ref_deps
)
205 $(ENVADD
) pdftex fr-dired-ref.
tex
206 fr-dired-ref.
dvi: $(fr_dired_ref_deps
)
207 $(ENVADD
) tex fr-dired-ref.
tex
208 fr-dired-ref.ps
: fr-dired-ref.
dvi
209 dvips
-t a4
-o
$@ fr-dired-ref.
dvi
211 fr_refcard_deps
= fr-refcard.
tex emacsver.
tex pdflayout.sty
212 fr-refcard.pdf
: $(fr_refcard_deps
)
213 $(ENVADD
) pdftex fr-refcard.
tex
214 fr-refcard.
dvi: $(fr_refcard_deps
)
215 $(ENVADD
) tex fr-refcard.
tex
216 fr-refcard.ps
: fr-refcard.
dvi
217 dvips
-t a4
-t landscape
-o
$@ fr-refcard.
dvi
219 fr_survival_deps
= fr-survival.
tex emacsver.
tex pdflayout.sty
220 fr-survival.pdf
: $(fr_survival_deps
)
221 $(ENVADD
) pdftex fr-survival.
tex
222 fr-survival.
dvi: $(fr_survival_deps
)
223 $(ENVADD
) tex fr-survival.
tex
224 fr-survival.ps
: fr-survival.
dvi
225 dvips
-t a4
-o
$@ fr-survival.
dvi
227 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
228 gnus_booklet_deps
= gnus-refcard.
tex gnus-logo.pdf
229 gnus-booklet.pdf
: $(gnus_booklet_deps
)
230 pdflatex
-jobname
=gnus-booklet
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
231 gnus-booklet.
dvi: gnus-refcard.
tex gnus-logo.eps
232 latex
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
233 mv gnus-refcard.
dvi $@
235 ###gnus-logo.pdf: gnus-logo.eps
236 ### ps2pdf gnus-logo.eps
238 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
239 gnus_refcard_deps
= gnus-refcard.
tex gnus-logo.pdf
240 gnus-refcard.pdf
: $(gnus_refcard_deps
)
241 pdflatex gnus-refcard.
tex
242 gnus-refcard.
dvi: $(gnus_refcard_deps
)
243 latex gnus-refcard.
tex
245 orgcard_deps
= orgcard.
tex emacsver.
tex pdflayout.sty
246 orgcard.pdf
: $(orgcard_deps
)
247 $(ENVADD
) pdftex orgcard.
tex
248 orgcard.
dvi: $(orgcard_deps
)
249 $(ENVADD
) tex orgcard.
tex
250 orgcard.ps
: orgcard.
dvi
251 dvips
-t a4
-t landscape
-o
$@ orgcard.
dvi
253 pl_refcard_deps
= pl-refcard.
tex emacsver.
tex pdflayout.sty
254 ## Some versions of pdfmex seem to create dvi by default, hence output-format.
255 pl-refcard.pdf
: $(pl_refcard_deps
)
256 if
! kpsewhich
-format
=fmt mex
> /dev
/null
&& \
257 ! pdfmex
--version
> /dev
/null
2> /dev
/null
; then \
258 echo
"No mex format found."; false
; \
260 $(ENVADD
) pdftex
-output-format
=pdf pl-refcard.
tex
261 pl-refcard.
dvi: $(pl_refcard_deps
)
262 if
! kpsewhich
-format
=fmt mex
> /dev
/null
; then \
263 echo
"No mex format found."; false
; \
265 $(ENVADD
) tex pl-refcard.
tex
266 pl-refcard.ps
: pl-refcard.
dvi
267 dvips
-t a4
-o
$@ pl-refcard.
dvi
269 pt_br_refcard_deps
= pt-br-refcard.
tex emacsver.
tex pdflayout.sty
270 pt-br-refcard.pdf
: $(pt_br_refcard_deps
)
271 $(ENVADD
) pdftex pt-br-refcard.
tex
272 pt-br-refcard.
dvi: $(pt_br_refcard_deps
)
273 $(ENVADD
) tex pt-br-refcard.
tex
274 pt-br-refcard.ps
: pt-br-refcard.
dvi
275 dvips
-t a4
-t landscape
-o
$@ pt-br-refcard.
dvi
277 refcard_deps
= refcard.
tex emacsver.
tex pdflayout.sty
278 refcard.pdf
: $(refcard_deps
)
279 $(ENVADD
) pdftex refcard.
tex
280 refcard.
dvi: $(refcard_deps
)
281 $(ENVADD
) tex refcard.
tex
282 refcard.ps
: refcard.
dvi
283 dvips
-t letter
-t landscape
-o
$@ refcard.
dvi
285 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
286 ru_refcard_deps
= ru-refcard.
tex
287 ru-refcard.pdf
: $(ru_refcard_deps
)
288 pdflatex ru-refcard.
tex
289 ru-refcard.
dvi: $(ru_refcard_deps
)
291 ru-refcard.ps
: ru-refcard.
dvi
292 dvips
-t a4
-o
$@ ru-refcard.
dvi
294 sk_dired_ref_deps
= sk-dired-ref.
tex emacsver.
tex pdflayout.sty
295 sk-dired-ref.pdf
: $(sk_dired_ref_deps
)
296 input
=sk-dired-ref.
tex; $(make_cs
)
297 sk-dired-ref.
dvi: $(sk_dired_ref_deps
)
298 $(ENVADD
) csplain sk-dired-ref.
tex
299 sk-dired-ref.ps
: sk-dired-ref.
dvi
300 dvips
-t a4
-o
$@ sk-dired-ref.
dvi
302 sk_refcard_deps
= sk-refcard.
tex emacsver.
tex pdflayout.sty
303 sk-refcard.pdf
: $(sk_refcard_deps
)
304 input
=sk-refcard.
tex; $(make_cs
)
305 sk-refcard.
dvi: $(sk_refcard_deps
)
306 $(ENVADD
) csplain sk-refcard.
tex
307 sk-refcard.ps
: sk-refcard.
dvi
308 dvips
-t a4
-o
$@ sk-refcard.
dvi
310 sk_survival_deps
= sk-survival.
tex emacsver.
tex pdflayout.sty
311 sk-survival.pdf
: $(sk_survival_deps
)
312 input
=sk-survival.
tex; $(make_cs
)
313 sk-survival.
dvi: $(sk_survival_deps
)
314 $(ENVADD
) csplain sk-survival.
tex
315 sk-survival.ps
: sk-survival.
dvi
316 dvips
-t a4
-o
$@ sk-survival.
dvi
318 survival_deps
= survival.
tex emacsver.
tex pdflayout.sty
319 survival.pdf
: $(survival_deps
)
320 $(ENVADD
) pdftex survival.
tex
321 survival.
dvi: $(survival_deps
)
322 $(ENVADD
) tex survival.
tex
324 vipcard_deps
= vipcard.
tex emacsver.
tex pdflayout.sty
325 vipcard.pdf
: $(vipcard_deps
)
326 $(ENVADD
) pdftex vipcard.
tex
327 vipcard.
dvi: $(vipcard_deps
)
328 $(ENVADD
) tex vipcard.
tex
330 vipercard_deps
= viperCard.
tex emacsver.
tex pdflayout.sty
331 viperCard.pdf
: $(vipercard_deps
)
332 $(ENVADD
) pdftex viperCard.
tex
333 viperCard.
dvi: $(vipercard_deps
)
334 $(ENVADD
) tex viperCard.
tex
340 -rm -f
*.
dvi *.log
*.aux
344 ## This should really by maintainer-clean, but the handling of the
345 ## refcards is funny. So abuse extraclean for this.
347 -rm -f
$(PDF_TARGETS
) $(PS_TARGETS
)
349 ## For the Emacs website.
351 rm -rf emacs-refcards
353 cp Makefile README
*.
tex gnus-logo.
* pdflayout.sty emacs-refcards
/
354 tar -cf emacs-refcards.
tar emacs-refcards
355 rm -rf emacs-refcards
357 ### Makefile ends here