1 ### Makefile for Emacs refcards
3 ## Copyright (C) 1993-1994, 2001-2015 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
)
61 PS_ENGLISH
= $(PDF_ENGLISH
:.pdf
=.ps
)
62 PS_CZECH
= $(PDF_CZECH
:.pdf
=.ps
)
63 PS_FRENCH
= $(PDF_FRENCH
:.pdf
=.ps
)
64 PS_GERMAN
= $(PDF_GERMAN
:.pdf
=.ps
)
65 PS_POLISH
= $(PDF_POLISH
:.pdf
=.ps
)
66 PS_PORTUGUESE
= $(PDF_PORTUGUESE
:.pdf
=.ps
)
67 PS_RUSSIAN
= $(PDF_RUSSIAN
:.pdf
=.ps
)
68 PS_SLOVAKIAN
= $(PDF_SLOVAKIAN
:.pdf
=.ps
)
70 PS_TARGETS
= $(PDF_TARGETS
:.pdf
=.ps
)
74 ENVADD
= TEXINPUTS
=".:$(TEXINPUTS)"
84 .PHONY
: english czech french german polish portuguese russian slovakian
85 english
: $(PDF_ENGLISH
)
90 portuguese
: $(PDF_PORTUGUESE
)
91 russian
: $(PDF_RUSSIAN
)
92 slovakian
: $(PDF_SLOVAKIAN
)
94 .PHONY
: english-ps czech-ps french-ps german-ps polish-ps portuguese-ps russian-ps slovakian-ps
95 english-ps
: $(PS_ENGLISH
)
97 french-ps
: $(PS_FRENCH
)
98 german-ps
: $(PS_GERMAN
)
99 polish-ps
: $(PS_POLISH
)
100 portuguese-ps
: $(PS_PORTUGUESE
)
101 russian-ps
: $(PS_RUSSIAN
)
102 slovakian-ps
: $(PS_SLOVAKIAN
)
105 ## Default for file that do not use a different paper size.
108 dvips
-t letter
-o
$@
$<
111 make_cs
=if pdfcsplain
--version
> /dev
/null
2> /dev
/null
; then \
112 $(ENVADD
) pdfcsplain
$$input; \
114 $(ENVADD
) csplain
"\pdfoutput=1\input $$input"; \
117 ## For pdf output, the page layouts (a4/letter) are written directly
118 ## in the .tex files.
120 ## For PostScript output, note that some of the tex files (refcard,
121 ## de-refcard, fr-refcard, pt-br-refcard) have settings for letter or
122 ## a4 paper. The Following are the default paper sizes (letter for English,
123 ## A4 for translations).
124 ## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
126 ## A4, landscape: de-refcard, fr-refcard, pt-br-refcard orgcard
127 ## A4, portrait: cs-*, fr-dired-ref, sk-*, pl-refcard, ru-refcard
128 ## Letter, landscape: calccard, refcard
129 ## Letter, portrait (suffix rule): dired-ref, gnus-*, survival, vip*
131 calccard_deps
= calccard.
tex emacsver.
tex pdflayout.sty
132 calccard.pdf
: $(calccard_deps
)
133 $(ENVADD
) pdftex calccard.
tex
134 calccard.
dvi: $(calccard_deps
)
135 $(ENVADD
) tex calccard.
tex
136 calccard.ps
: calccard.
dvi
137 dvips
-t letter
-t landscape
-o
$@ calccard.
dvi
139 cs_dired_ref_deps
= cs-dired-ref.
tex emacsver.
tex pdflayout.sty
140 cs-dired-ref.pdf
: $(cs_dired_ref_deps
)
141 input
=cs-dired-ref.
tex; $(make_cs
)
142 cs-dired-ref.
dvi: $(cs_dired_ref_deps
)
143 $(ENVADD
) csplain cs-dired-ref.
tex
144 cs-dired-ref.ps
: cs-dired-ref.
dvi
145 dvips
-t a4
-o
$@ cs-dired-ref.
dvi
147 cs_refcard_deps
= cs-refcard.
tex emacsver.
tex pdflayout.sty
148 cs-refcard.pdf
: $(cs_refcard_deps
)
149 input
=cs-refcard.
tex; $(make_cs
)
150 cs-refcard.
dvi: $(cs_refcard_deps
)
151 $(ENVADD
) csplain cs-refcard.
tex
152 cs-refcard.ps
: cs-refcard.
dvi
153 dvips
-t a4
-o
$@ cs-refcard.
dvi
155 cs_survival_deps
= cs-survival.
tex emacsver.
tex pdflayout.sty
156 cs-survival.pdf
: $(cs_survival_deps
)
157 input
=cs-survival.
tex; $(make_cs
)
158 cs-survival.
dvi: $(cs_survival_deps
)
159 $(ENVADD
) csplain cs-survival.
tex
160 cs-survival.ps
: cs-survival.
dvi
161 dvips
-t a4
-o
$@ cs-survival.
dvi
163 de_refcard_deps
= de-refcard.
tex emacsver.
tex pdflayout.sty
164 de-refcard.pdf
: $(de_refcard_deps
)
165 $(ENVADD
) pdftex de-refcard.
tex
166 de-refcard.
dvi: $(de_refcard_deps
)
167 $(ENVADD
) tex de-refcard.
tex
168 de-refcard.ps
: de-refcard.
dvi
169 dvips
-t a4
-t landscape
-o
$@ de-refcard.
dvi
171 dired_ref_deps
= dired-ref.
tex emacsver.
tex pdflayout.sty
172 dired-ref.pdf
: $(dired_ref_deps
)
173 $(ENVADD
) pdftex dired-ref.
tex
174 dired-ref.
dvi: $(dired_ref_deps
)
175 $(ENVADD
) tex dired-ref.
tex
177 fr_dired_ref_deps
= fr-dired-ref.
tex emacsver.
tex pdflayout.sty
178 fr-dired-ref.pdf
: $(fr_dired_ref_deps
)
179 $(ENVADD
) pdftex fr-dired-ref.
tex
180 fr-dired-ref.
dvi: $(fr_dired_ref_deps
)
181 $(ENVADD
) tex fr-dired-ref.
tex
182 fr-dired-ref.ps
: fr-dired-ref.
dvi
183 dvips
-t a4
-o
$@ fr-dired-ref.
dvi
185 fr_refcard_deps
= fr-refcard.
tex emacsver.
tex pdflayout.sty
186 fr-refcard.pdf
: $(fr_refcard_deps
)
187 $(ENVADD
) pdftex fr-refcard.
tex
188 fr-refcard.
dvi: $(fr_refcard_deps
)
189 $(ENVADD
) tex fr-refcard.
tex
190 fr-refcard.ps
: fr-refcard.
dvi
191 dvips
-t a4
-t landscape
-o
$@ fr-refcard.
dvi
193 fr_survival_deps
= fr-survival.
tex emacsver.
tex pdflayout.sty
194 fr-survival.pdf
: $(fr_survival_deps
)
195 $(ENVADD
) pdftex fr-survival.
tex
196 fr-survival.
dvi: $(fr_survival_deps
)
197 $(ENVADD
) tex fr-survival.
tex
198 fr-survival.ps
: fr-survival.
dvi
199 dvips
-t a4
-o
$@ fr-survival.
dvi
201 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
202 gnus_booklet_deps
= gnus-refcard.
tex gnus-logo.pdf
203 gnus-booklet.pdf
: $(gnus_booklet_deps
)
204 pdflatex
-jobname
=gnus-booklet
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
205 gnus-booklet.
dvi: gnus-refcard.
tex gnus-logo.eps
206 latex
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
207 mv gnus-refcard.
dvi $@
209 ###gnus-logo.pdf: gnus-logo.eps
210 ### ps2pdf gnus-logo.eps
212 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
213 gnus_refcard_deps
= gnus-refcard.
tex gnus-logo.pdf
214 gnus-refcard.pdf
: $(gnus_refcard_deps
)
215 pdflatex gnus-refcard.
tex
216 gnus-refcard.
dvi: $(gnus_refcard_deps
)
217 latex gnus-refcard.
tex
219 orgcard_deps
= orgcard.
tex emacsver.
tex pdflayout.sty
220 orgcard.pdf
: $(orgcard_deps
)
221 $(ENVADD
) pdftex orgcard.
tex
222 orgcard.
dvi: $(orgcard_deps
)
223 $(ENVADD
) tex orgcard.
tex
224 orgcard.ps
: orgcard.
dvi
225 dvips
-t a4
-t landscape
-o
$@ orgcard.
dvi
227 pl_refcard_deps
= pl-refcard.
tex emacsver.
tex pdflayout.sty
228 ## Some versions of pdfmex seem to create dvi by default, hence output-format.
229 pl-refcard.pdf
: $(pl_refcard_deps
)
230 if
! kpsewhich
-format
=fmt mex
> /dev
/null
&& \
231 ! pdfmex
--version
> /dev
/null
2> /dev
/null
; then \
232 echo
"No mex format found."; false
; \
234 $(ENVADD
) pdftex
-output-format
=pdf pl-refcard.
tex
235 pl-refcard.
dvi: $(pl_refcard_deps
)
236 if
! kpsewhich
-format
=fmt mex
> /dev
/null
; then \
237 echo
"No mex format found."; false
; \
239 $(ENVADD
) tex pl-refcard.
tex
240 pl-refcard.ps
: pl-refcard.
dvi
241 dvips
-t a4
-o
$@ pl-refcard.
dvi
243 pt_br_refcard_deps
= pt-br-refcard.
tex emacsver.
tex pdflayout.sty
244 pt-br-refcard.pdf
: $(pt_br_refcard_deps
)
245 $(ENVADD
) pdftex pt-br-refcard.
tex
246 pt-br-refcard.
dvi: $(pt_br_refcard_deps
)
247 $(ENVADD
) tex pt-br-refcard.
tex
248 pt-br-refcard.ps
: pt-br-refcard.
dvi
249 dvips
-t a4
-t landscape
-o
$@ pt-br-refcard.
dvi
251 refcard_deps
= refcard.
tex emacsver.
tex pdflayout.sty
252 refcard.pdf
: $(refcard_deps
)
253 $(ENVADD
) pdftex refcard.
tex
254 refcard.
dvi: $(refcard_deps
)
255 $(ENVADD
) tex refcard.
tex
256 refcard.ps
: refcard.
dvi
257 dvips
-t letter
-t landscape
-o
$@ refcard.
dvi
259 ## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
260 ru_refcard_deps
= ru-refcard.
tex
261 ru-refcard.pdf
: $(ru_refcard_deps
)
262 pdflatex ru-refcard.
tex
263 ru-refcard.
dvi: $(ru_refcard_deps
)
265 ru-refcard.ps
: ru-refcard.
dvi
266 dvips
-t a4
-o
$@ ru-refcard.
dvi
268 sk_dired_ref_deps
= sk-dired-ref.
tex emacsver.
tex pdflayout.sty
269 sk-dired-ref.pdf
: $(sk_dired_ref_deps
)
270 input
=sk-dired-ref.
tex; $(make_cs
)
271 sk-dired-ref.
dvi: $(sk_dired_ref_deps
)
272 $(ENVADD
) csplain sk-dired-ref.
tex
273 sk-dired-ref.ps
: sk-dired-ref.
dvi
274 dvips
-t a4
-o
$@ sk-dired-ref.
dvi
276 sk_refcard_deps
= sk-refcard.
tex emacsver.
tex pdflayout.sty
277 sk-refcard.pdf
: $(sk_refcard_deps
)
278 input
=sk-refcard.
tex; $(make_cs
)
279 sk-refcard.
dvi: $(sk_refcard_deps
)
280 $(ENVADD
) csplain sk-refcard.
tex
281 sk-refcard.ps
: sk-refcard.
dvi
282 dvips
-t a4
-o
$@ sk-refcard.
dvi
284 sk_survival_deps
= sk-survival.
tex emacsver.
tex pdflayout.sty
285 sk-survival.pdf
: $(sk_survival_deps
)
286 input
=sk-survival.
tex; $(make_cs
)
287 sk-survival.
dvi: $(sk_survival_deps
)
288 $(ENVADD
) csplain sk-survival.
tex
289 sk-survival.ps
: sk-survival.
dvi
290 dvips
-t a4
-o
$@ sk-survival.
dvi
292 survival_deps
= survival.
tex emacsver.
tex pdflayout.sty
293 survival.pdf
: $(survival_deps
)
294 $(ENVADD
) pdftex survival.
tex
295 survival.
dvi: $(survival_deps
)
296 $(ENVADD
) tex survival.
tex
298 vipcard_deps
= vipcard.
tex emacsver.
tex pdflayout.sty
299 vipcard.pdf
: $(vipcard_deps
)
300 $(ENVADD
) pdftex vipcard.
tex
301 vipcard.
dvi: $(vipcard_deps
)
302 $(ENVADD
) tex vipcard.
tex
304 vipercard_deps
= viperCard.
tex emacsver.
tex pdflayout.sty
305 viperCard.pdf
: $(vipercard_deps
)
306 $(ENVADD
) pdftex viperCard.
tex
307 viperCard.
dvi: $(vipercard_deps
)
308 $(ENVADD
) tex viperCard.
tex
314 -rm -f
*.
dvi *.log
*.aux
318 ## This should really by maintainer-clean, but the handling of the
319 ## refcards is funny. So abuse extraclean for this.
321 -rm -f
$(PDF_TARGETS
) $(PS_TARGETS
)
323 ## For the Emacs website.
325 rm -rf emacs-refcards
327 cp Makefile README
*.
tex gnus-logo.
* pdflayout.sty emacs-refcards
/
328 tar -cf emacs-refcards.
tar emacs-refcards
329 rm -rf emacs-refcards
331 ### Makefile ends here