ips.cls: Fix the page size of the PDF output.
[doc/ips] / Makefile.m4
CommitLineData
384bd7f2 1## -*-fundamental-*-
2##
b912aadf 3## $Id: Makefile.m4,v 1.1 2002/02/24 15:43:20 mdw Exp $
384bd7f2 4##
5## Makefile for IPS
6##
7## (c) 2002 Mark Wooding
8##
9
10##----- Licensing notice ----------------------------------------------------
11##
12## This program is free software; you can redistribute it and/or modify
13## it under the terms of the GNU General Public License as published by
14## the Free Software Foundation; either version 2 of the License, or
15## (at your option) any later version.
16##
17## This program is distributed in the hope that it will be useful,
18## but WITHOUT ANY WARRANTY; without even the implied warranty of
19## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20## GNU General Public License for more details.
21##
22## You should have received a copy of the GNU General Public License
23## along with this program; if not, write to the Free Software Foundation,
24## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
384bd7f2 26AUTOMAKE_OPTIONS = foreign
27
28SRC = \
29 ips.tex ips.cls \
30 basics.tex \
31 auth-mac.tex auth-sig.tex \
32 enc-intro.tex enc-pub.tex enc-symm.tex enc-ies.tex
33
34changequote([[, ]])
35
36define([[OUTPUTS]], [[dnl
37_([[notes]], [[\ipsslidesfalse\ipsanswerstrue]])dnl
38_([[noans]], [[\ipsslidesfalse\ipsanswersfalse]])dnl
39_([[slides]], [[\ipsslidestrue]])dnl
40]])
41define([[adorn]], [[define([[_]], [[$2$]][[1$3 ]])$1]])
42define([[tags]], [[adorn([[$1]])]])
43define([[addsuffix]], [[adorn([[$1]], [[ips-]], [[$2]])]])
44
45DVIGZ = addsuffix([[OUTPUTS]], [[.dvi.gz]])
46PSGZ = addsuffix([[OUTPUTS]], [[.ps.gz]])
47PDF = addsuffix([[OUTPUTS]], [[.pdf]])
48
49noinst_DATA = $(DVIGZ) $(PSGZ) $(PDF)
50
51define([[_]], [[dnl
52ips-$1.dvi: $(SRC)
53 @if [ ! -d $1 ]; then \
54 mkdir $1; \
5431b602 55 for i in $(SRC); do ln -s ../$(srcdir)/$$i $1; done; \
384bd7f2 56 echo '$2' >$1/ips.cfg; \
57 fi
58 cd $1 && \
59 latex ips && bibtex ips && latex ips && latex ips && \
60 cp ips.dvi ../ips-$1.dvi
61ips-$1.pdf: ips-$1.dvi
62 cd $1 && pdflatex ips && cp ips.pdf ../ips-$1.pdf
63ips-$1.dvi.gz: ips-$1.dvi
64 gzip -9cv ips-$1.dvi >ips-$1.dvi.gz
65ips-$1.ps: ips-$1.dvi
66 dvips -o ips-$1.ps ips-$1.dvi
67ips-$1.ps.gz: ips-$1.ps
68 gzip -9cv ips-$1.ps >ips-$1.ps.gz
69]])
70OUTPUTS
71
72CLEANFILES = *.dvi *.ps $(DVIGZ) $(PSGZ) $(PDF)
73
74Makefile.am: Makefile.m4
75 cd $(srcdir) && m4 Makefile.m4 >Makefile.am
76
77EXTRA_DIST = $(SRC) Makefile.m4
78
79clean:; rm -rf tags([[OUTPUTS]])
80
81.PHONY: dvi
82
83##----- That's all, folks ---------------------------------------------------