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 |
26 | AUTOMAKE_OPTIONS = foreign |
27 | |
28 | SRC = \ |
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 | |
34 | changequote([[, ]]) |
35 | |
36 | define([[OUTPUTS]], [[dnl |
37 | _([[notes]], [[\ipsslidesfalse\ipsanswerstrue]])dnl |
38 | _([[noans]], [[\ipsslidesfalse\ipsanswersfalse]])dnl |
39 | _([[slides]], [[\ipsslidestrue]])dnl |
40 | ]]) |
41 | define([[adorn]], [[define([[_]], [[$2$]][[1$3 ]])$1]]) |
42 | define([[tags]], [[adorn([[$1]])]]) |
43 | define([[addsuffix]], [[adorn([[$1]], [[ips-]], [[$2]])]]) |
44 | |
45 | DVIGZ = addsuffix([[OUTPUTS]], [[.dvi.gz]]) |
46 | PSGZ = addsuffix([[OUTPUTS]], [[.ps.gz]]) |
47 | PDF = addsuffix([[OUTPUTS]], [[.pdf]]) |
48 | |
49 | noinst_DATA = $(DVIGZ) $(PSGZ) $(PDF) |
50 | |
51 | define([[_]], [[dnl |
52 | ips-$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 |
61 | ips-$1.pdf: ips-$1.dvi |
62 | cd $1 && pdflatex ips && cp ips.pdf ../ips-$1.pdf |
63 | ips-$1.dvi.gz: ips-$1.dvi |
64 | gzip -9cv ips-$1.dvi >ips-$1.dvi.gz |
65 | ips-$1.ps: ips-$1.dvi |
66 | dvips -o ips-$1.ps ips-$1.dvi |
67 | ips-$1.ps.gz: ips-$1.ps |
68 | gzip -9cv ips-$1.ps >ips-$1.ps.gz |
69 | ]]) |
70 | OUTPUTS |
71 | |
72 | CLEANFILES = *.dvi *.ps $(DVIGZ) $(PSGZ) $(PDF) |
73 | |
74 | Makefile.am: Makefile.m4 |
75 | cd $(srcdir) && m4 Makefile.m4 >Makefile.am |
76 | |
77 | EXTRA_DIST = $(SRC) Makefile.m4 |
78 | |
79 | clean:; rm -rf tags([[OUTPUTS]]) |
80 | |
81 | .PHONY: dvi |
82 | |
83 | ##----- That's all, folks --------------------------------------------------- |