cpsa-2.0.0: doc/Makefile
# A LaTeX/MetaPost makefile -- requires GNU Make
SHELL = /bin/sh
DESIGN = cpsadesign
PRIMER = cpsaprimer
SPEC = cpsaspec
OVERVIEW = cpsaoverview
BIB = cpsa
TEX_SRCS = macros.tex bcasyntax.tex
MP_SRCS = cpsadiagrams.mp carriers.mp termtree.mp
%-0.mps: %.mp
mpost -tex=latex $*
%.bbl: $(BIB).bib
if test ! -f $*.aux; then pdflatex $*.tex; fi
bibtex $*
pdflatex $*.tex
%.ind: %.idx
makeindex $*
all: $(DESIGN).pdf $(OVERVIEW).pdf $(PRIMER).pdf $(SPEC).pdf
$(DESIGN).pdf: $(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \
$(DESIGN).tex $(DESIGN).bbl
if test ! -f $(DESIGN).aux; then pdflatex $(DESIGN).tex; fi
if test -f $(DESIGN).idx; then $(MAKE) $(DESIGN).ind; fi
pdflatex $(DESIGN).tex
$(OVERVIEW).pdf: $(OVERVIEW).tex
if test ! -f $(OVERVIEW).aux; then pdflatex $(OVERVIEW).tex; fi
pdflatex $(OVERVIEW).tex
$(PRIMER).pdf: $(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \
$(PRIMER).tex $(PRIMER).bbl
if test ! -f $(PRIMER).aux; then pdflatex $(PRIMER).tex; fi
if test -f $(PRIMER).idx; then $(MAKE) $(PRIMER).ind; fi
pdflatex $(PRIMER).tex
$(SPEC).pdf: $(MP_SRCS:.mp=-0.mps) $(TEX_SRCS) \
$(SPEC).tex $(SPEC).bbl
if test ! -f $(SPEC).aux; then pdflatex $(SPEC).tex; fi
if test -f $(SPEC).idx; then $(MAKE) $(SPEC).ind; fi
pdflatex $(SPEC).tex
CLEAN_FILES := $(DESIGN).pdf $(OVERVIEW).pdf $(PRIMER).pdf $(SPEC).pdf \
$(wildcard *.log *.aux *.toc *.mps *.mpx) \
$(wildcard *.bbl *.blg *.ind *.idx *.ilg *.out)
clean:
-rm $(CLEAN_FILES)
dist: clean
DIR=`pwd`; DIR=`basename $${DIR}`; \
cd ..; tar czf $${DIR}.tar.gz $${DIR}