3 ## $Id: Makefile.m4,v 1.1 2002/02/24 15:43:20 mdw Exp $
7 ## (c) 2002 Mark Wooding
10 ##----- Licensing notice ----------------------------------------------------
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.
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.
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.
26 AUTOMAKE_OPTIONS = foreign
29 wrslides.tex wrslides.cls \
30 wr-backg.tex wr-main.tex ecc.mp \
35 define([[DOECC]], [[mpost ecc.mp && mptopdf ecc.0 &&]])
36 define([[L1]], [[latex $1]])
38 [[latex $1 && bibtex $1 && latex $1 && latex $1 && latex $1]])
39 define([[OUTPUTS]], [[dnl
40 _([[notes]], [[L1]], [[wrslides]],
41 [[\wrslidesfalse]], [[DOECC]])dnl
42 _([[slides]], [[L1]], [[wrslides]],
43 [[\wrslidestrue\includeonly{wr-main}]], [[DOECC]])dnl
44 _([[longslides]], [[L1]], [[wrslides]],
45 [[\wrslidestrue]], [[DOECC]])dnl
46 _([[paper]], [[LFULL]], [[wrestlers]], [[]])dnl
47 _([[llncs]], [[LFULL]], [[wrestlers]], [[\fancystylefalse\shorttrue]])dnl
49 define([[adorn]], [[define([[_]], [[$2$]][[1$3 ]])$1]])
50 define([[tags]], [[adorn([[$1]])]])
51 define([[addsuffix]], [[adorn([[$1]], [[wr-]], [[$2]])]])
53 DVI = addsuffix([[OUTPUTS]], [[.dvi]])
54 DVIGZ = addsuffix([[OUTPUTS]], [[.dvi.gz]])
55 PS = addsuffix([[OUTPUTS]], [[.ps]])
56 PSGZ = addsuffix([[OUTPUTS]], [[.ps.gz]])
57 PDF = addsuffix([[OUTPUTS]], [[.pdf]])
59 noinst_DATA = $(DVI) $(DVIGZ) $(PS) $(PSGZ) $(PDF)
63 @if [ ! -d $1 ]; then \
65 for i in $(SRC); do ln -s ../$(srcdir)/$$i $1; done; \
66 echo '$4' >$1/wr.cfg; \
68 cd $1 && $5 $2($3) && cp $3.dvi ../wr-$1.dvi
70 cd $1 && pdflatex $3 && cp $3.pdf ../wr-$1.pdf
74 %.gz: %; gzip -9cv $^ >$@.new && mv $@.new $@
75 %.ps: %.dvi; dvips -o $@ $^
77 CLEANFILES = *.dvi *.ps $(DVIGZ) $(PSGZ) $(PDF) *.[0-9] *-[0-9].pdf
79 Makefile.am: Makefile.m4
80 cd $(srcdir) && m4 Makefile.m4 >Makefile.am
82 EXTRA_DIST = $(SRC) Makefile.m4
84 clean:; rm -rf tags([[OUTPUTS]]) && rm -f $(CLEANFILES)
88 ##----- That's all, folks ---------------------------------------------------