1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
QUIP := quip
IMG_DIR := images
SCRIPT_DIR := scripts
FIGS := $(wildcard $(IMG_DIR)/*.fig)
GIFS := $(wildcard $(IMG_DIR)/*.gif)
PDFS := $(GIFS:.gif=.pdf) $(FIGS:.fig=.pdf)
EPSFS := $(GIFS:.gif=.epsf) $(FIGS:.fig=.epsf)
all: tutorial.pdf tutorial.ps tutorial_examples.tar.gz
%.pdf: %.fig
fig2dev -L pdf $< $@
%.epsf: %.fig
fig2dev -L eps $< $@
%.pdf: %.gif
convert $< $@
%.epsf: %.gif
convert $< $@
%.tex: %.xml \
$(SCRIPT_DIR)/transformscript.xsl \
$(SCRIPT_DIR)/transformscript.xquery \
$(SCRIPT_DIR)/deleteTags.xquery \
$(SCRIPT_DIR)/latexVerbatim.xquery
$(QUIP) -exit_on_fail -value_output -input $< -o $@ \
-include $(SCRIPT_DIR)/transformscript.xquery \
-include $(SCRIPT_DIR)/deleteTags.xquery \
$(SCRIPT_DIR)/latexVerbatim.xquery
# NOTE: Strangely enough, the PDF and the DVI output differs a bit, so we keep
# the intermediate files apart in the two rules below.
tutorial.pdf: tutorial.tex bib.bib $(PDFS)
cp $< tutorial_pdf.tex
pdflatex tutorial_pdf
-bibtex tutorial_pdf
makeindex Klassen
pdflatex tutorial_pdf
pdflatex tutorial_pdf
$(RM) $@
mv tutorial_pdf.pdf $@
tutorial.dvi: tutorial.tex bib.bib $(EPSFS)
cp $< tutorial_ltx.tex
latex tutorial_ltx
-bibtex tutorial_ltx
makeindex Klassen
latex tutorial_ltx
latex tutorial_ltx
$(RM) $@
mv tutorial_ltx.dvi $@
tutorial.ps: tutorial.dvi $(EPSFS)
dvips -o tutorial.ps tutorial.dvi
tutorial_examples.tar.gz: tutorial.xml extractExamples $(SCRIPT_DIR)/deleteTags.xquery
./extractExamples
clean::
$(RM) *.aux *.bbl *.blg *.dvi *.idx *.ilg *.ind *.lof *.log *.pdf *.ps *.tex *.toc
$(RM) $(PDFS)
$(RM) $(EPSFS)
rm -rf bin obj src
$(RM) code.xml header.xml klasse.xml examples.html tutorial_examples.tar.gz
|