Fix the MS-Windows build broken by absence of the *.manifest files.
[emacs.git] / etc / refcards / Makefile
blobef810da6022940969ba0997e8b6808d3aa312901
1 ### Makefile for Emacs refcards
3 ## Copyright (C) 1993-1994, 2001-2012 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/>.
21 ## Top-level targets.
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 \
32 sk-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}
50 ENVADD = TEXINPUTS=".:"
52 ## PDF files.
54 ## The page layouts (a4/letter) are written directly in the .tex files.
56 cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \
57 sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex emacsver.tex
58 if pdfcsplain --version > /dev/null 2> /dev/null; then \
59 ${ENVADD} pdfcsplain $<; \
60 else \
61 ${ENVADD} csplain "\pdfoutput=1\input $<"; \
64 ## Some versions of pdfmex seem to create dvi by default, hence output-format.
65 pl-refcard.pdf: %.pdf: %.tex emacsver.tex
66 if ! kpsewhich -format=fmt mex > /dev/null && \
67 ! pdfmex --version > /dev/null 2> /dev/null; then \
68 echo "No mex format found."; false; \
70 ${ENVADD} pdftex -output-format=pdf $<
72 ru-refcard.pdf: %.pdf: %.tex
73 pdflatex $<
75 #gnus-logo.pdf: %.pdf: %.eps
76 # ps2pdf $<
78 gnus-refcard.pdf: %.pdf: %.tex gnus-logo.pdf
79 pdflatex $<
81 gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf
82 pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
84 ## Everything not explicitly listed above.
85 %.pdf: %.tex emacsver.tex
86 ${ENVADD} pdftex $<
89 ## dvi files.
91 cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \
92 sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex emacsver.tex
93 ${ENVADD} csplain $<
95 pl-refcard.dvi: %.dvi: %.tex emacsver.tex
96 if ! kpsewhich -format=fmt mex > /dev/null; then \
97 echo "No mex format found."; false; \
99 ${ENVADD} tex $<
101 ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex
102 latex $<
104 gnus-booklet.dvi: gnus-refcard.tex
105 latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
106 mv gnus-refcard.dvi $@
108 ## Everything not explicitly listed above.
109 %.dvi: %.tex emacsver.tex
110 ${ENVADD} tex $<
113 ## PostScript files.
115 ## Note that some of the tex files (refcard, de-refcard, fr-refcard,
116 ## pt-br-refcard) have settings for letter or a4 paper. Following are
117 ## the default paper sizes (letter for English, A4 for translations).
118 ## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
120 ## A4, landscape.
121 de-refcard.ps fr-refcard.ps pt-br-refcard.ps orgcard.ps: %.ps: %.dvi
122 dvips -t a4 -t landscape $< -o $@
124 ## A4, portrait.
125 cs-dired-ref.ps cs-refcard.ps cs-survival.ps fr-dired-ref.ps \
126 pl-refcard.ps ru-refcard.ps \
127 sk-dired-ref.ps sk-refcard.ps sk-survival.ps: %.ps: %.dvi
128 dvips -t a4 $< -o $@
130 ## letter, landscape.
131 calccard.ps refcard.ps: %.ps: %.dvi
132 dvips -t letter -t landscape $< -o $@
134 ## letter, portrait.
135 dired-ref.ps gnus-booklet.ps gnus-refcard.ps survival.ps vipcard.ps \
136 viperCard.ps: %.ps: %.dvi
137 dvips -t letter $< -o $@
140 .PHONY: clean
142 clean:
143 -rm -f *.dvi *.log *.aux
145 ### Makefile ends here