1 ### Makefile for Emacs refcards
3 ## Copyright (C) 1993-1994, 2001-2011 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/>.
23 ## PDF files that are included with Emacs.
24 all: refcards_pdf dired-refcards_pdf misc-refcards_pdf
26 REFCARDS_PDF
= refcard.pdf cs-refcard.pdf de-refcard.pdf fr-refcard.pdf \
27 pl-refcard.pdf pt-br-refcard.pdf ru-refcard.pdf sk-refcard.pdf
28 refcards_pdf
: ${REFCARDS_PDF}
29 refcards_ps
: ${REFCARDS_PDF
:.pdf
=.ps
}
31 DIRED_REFCARDS_PDF
= dired-ref.pdf cs-dired-ref.pdf fr-dired-ref.pdf \
33 dired-refcards_pdf
: ${DIRED_REFCARDS_PDF}
34 dired-refcards_ps
: ${DIRED_REFCARDS_PDF
:.pdf
=.ps
}
36 MISC_REFCARDS_PDF
= calccard.pdf gnus-booklet.pdf gnus-refcard.pdf orgcard.pdf
37 misc-refcards_pdf
: ${MISC_REFCARDS_PDF}
38 misc-refcards_ps
: ${MISC_REFCARDS_PDF
:.pdf
=.ps
}
41 ## The following files are not included with Emacs.
42 SURVIVAL_CARDS_PDF
= survival.pdf cs-survival.pdf sk-survival.pdf
43 survival-cards_pdf
: ${SURVIVAL_CARDS_PDF}
44 survival-cards_ps
: ${SURVIVAL_CARDS_PDF
:.pdf
=.ps
}
46 VIPER_CARDS_PDF
= vipcard.pdf viperCard.pdf
47 viper-cards_pdf
: ${VIPER_CARDS_PDF}
48 viper-cards_ps
: ${VIPER_CARDS_PDF
:.pdf
=.ps
}
53 ## The page layouts (a4/letter) are written directly in the .tex files.
55 cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \
56 sk-dired-ref.pdf sk-survival.pdf
: %.pdf
: %.
tex
57 if pdfcsplain
--version
> /dev
/null
2> /dev
/null
; then \
60 csplain
"\pdfoutput=1\input $<"; \
63 ## Some versions of pdfmex seem to create dvi by default, hence output-format.
64 pl-refcard.pdf
: %.pdf
: %.
tex
65 if
! kpsewhich
-format
=fmt mex
> /dev
/null
&& \
66 ! pdfmex
--version
> /dev
/null
2> /dev
/null
; then \
67 echo
"No mex format found."; false
; \
69 pdftex
-output-format
=pdf
$<
71 ru-refcard.pdf
: %.pdf
: %.
tex
74 #gnus-logo.pdf: %.pdf: %.eps
77 gnus-refcard.pdf
: %.pdf
: %.
tex gnus-logo.pdf
80 gnus-booklet.pdf
: gnus-refcard.
tex gnus-logo.pdf
81 pdflatex
-jobname
=gnus-booklet
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
83 ## Everything not explicitly listed above.
90 cs-refcard.
dvi cs-dired-ref.
dvi cs-survival.
dvi sk-refcard.
dvi \
91 sk-dired-ref.
dvi sk-survival.
dvi: %.
dvi: %.
tex
94 pl-refcard.
dvi: %.
dvi: %.
tex
95 if
! kpsewhich
-format
=fmt mex
> /dev
/null
; then \
96 echo
"No mex format found."; false
; \
100 ru-refcard.
dvi gnus-refcard.
dvi: %.
dvi: %.
tex
103 gnus-booklet.
dvi: gnus-refcard.
tex
104 latex
'\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
105 mv gnus-refcard.
dvi $@
107 ## Everything not explicitly listed above.
114 ## Note that some of the tex files (refcard, de-refcard, fr-refcard,
115 ## pt-br-refcard) have settings for letter or a4 paper. Following are
116 ## the default paper sizes (letter for English, A4 for translations).
117 ## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
120 de-refcard.ps fr-refcard.ps pt-br-refcard.ps orgcard.ps
: %.ps
: %.
dvi
121 dvips
-t a4
-t landscape
$< -o
$@
124 cs-dired-ref.ps cs-refcard.ps cs-survival.ps fr-dired-ref.ps \
125 pl-refcard.ps ru-refcard.ps \
126 sk-dired-ref.ps sk-refcard.ps sk-survival.ps
: %.ps
: %.
dvi
129 ## letter, landscape.
130 calccard.ps refcard.ps
: %.ps
: %.
dvi
131 dvips
-t letter
-t landscape
$< -o
$@
134 dired-ref.ps gnus-booklet.ps gnus-refcard.ps survival.ps vipcard.ps \
135 viperCard.ps
: %.ps
: %.
dvi
136 dvips
-t letter
$< -o
$@
142 -rm -f
*.
dvi *.log
*.aux
144 ### Makefile ends here