### Makefile for Emacs refcards
-## Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-## 2008, 2009, 2010 Free Software Foundation, Inc.
+## Copyright (C) 1993-1994, 2001-2011 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
#
cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \
sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex
- csplain "\pdfoutput=1\input $<"
+ if pdfcsplain --version > /dev/null 2> /dev/null; then \
+ pdfcsplain $<; \
+ else \
+ csplain "\pdfoutput=1\input $<"; \
+ fi
+## Some versions of pdfmex seem to create dvi by default, hence output-format.
pl-refcard.pdf: %.pdf: %.tex
- if ! kpsewhich -format=fmt mex > /dev/null; then \
+ if ! kpsewhich -format=fmt mex > /dev/null && \
+ ! pdfmex --version > /dev/null 2> /dev/null; then \
echo "No mex format found."; false; \
fi
- pdftex $<
+ pdftex -output-format=pdf $<
ru-refcard.pdf: %.pdf: %.tex
pdflatex $<
pdftex $<
-
## dvi files.
cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \