## -*-fundamental-*- ## ## $Id: Makefile.m4,v 1.1 2002/02/24 15:43:20 mdw Exp $ ## ## Makefile for IPS ## ## (c) 2002 Mark Wooding ## ##----- Licensing notice ---------------------------------------------------- ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. AUTOMAKE_OPTIONS = foreign SRC = \ wrslides.tex wrslides.cls \ wr-backg.tex wr-main.tex ecc.mp \ wrestlers.tex changequote([[, ]]) define([[DOECC]], [[mpost ecc.mp && mptopdf ecc.0 &&]]) define([[L1]], [[latex $1]]) define([[LFULL]], [[latex $1 && bibtex $1 && latex $1 && latex $1 && latex $1]]) define([[OUTPUTS]], [[dnl _([[notes]], [[L1]], [[wrslides]], [[\wrslidesfalse]], [[DOECC]])dnl _([[slides]], [[L1]], [[wrslides]], [[\wrslidestrue\includeonly{wr-main}]], [[DOECC]])dnl _([[longslides]], [[L1]], [[wrslides]], [[\wrslidestrue]], [[DOECC]])dnl _([[paper]], [[LFULL]], [[wrestlers]], [[]])dnl _([[llncs]], [[LFULL]], [[wrestlers]], [[\fancystylefalse\shorttrue]])dnl ]]) define([[adorn]], [[define([[_]], [[$2$]][[1$3 ]])$1]]) define([[tags]], [[adorn([[$1]])]]) define([[addsuffix]], [[adorn([[$1]], [[wr-]], [[$2]])]]) DVI = addsuffix([[OUTPUTS]], [[.dvi]]) DVIGZ = addsuffix([[OUTPUTS]], [[.dvi.gz]]) PS = addsuffix([[OUTPUTS]], [[.ps]]) PSGZ = addsuffix([[OUTPUTS]], [[.ps.gz]]) PDF = addsuffix([[OUTPUTS]], [[.pdf]]) noinst_DATA = $(DVI) $(DVIGZ) $(PS) $(PSGZ) $(PDF) define([[_]], [[dnl wr-$1.dvi: $(SRC) @if [ ! -d $1 ]; then \ mkdir $1; \ for i in $(SRC); do ln -s ../$(srcdir)/$$i $1; done; \ echo '$4' >$1/wr.cfg; \ fi cd $1 && $5 $2($3) && cp $3.dvi ../wr-$1.dvi wr-$1.pdf: wr-$1.dvi cd $1 && pdflatex $3 && cp $3.pdf ../wr-$1.pdf ]]) OUTPUTS %.gz: %; gzip -9cv $^ >$@.new && mv $@.new $@ %.ps: %.dvi; dvips -o $@ $^ CLEANFILES = *.dvi *.ps $(DVIGZ) $(PSGZ) $(PDF) *.[0-9] *-[0-9].pdf Makefile.am: Makefile.m4 cd $(srcdir) && m4 Makefile.m4 >Makefile.am EXTRA_DIST = $(SRC) Makefile.m4 clean:; rm -rf tags([[OUTPUTS]]) && rm -f $(CLEANFILES) .PHONY: dvi ##----- That's all, folks ---------------------------------------------------