File: Makefile

package info (click to toggle)
ghc-cvs 20040725-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 68,484 kB
  • ctags: 19,658
  • sloc: haskell: 251,945; ansic: 109,709; asm: 24,961; sh: 12,825; perl: 5,786; makefile: 5,334; xml: 3,884; python: 682; yacc: 650; lisp: 477; cpp: 337; ml: 76; fortran: 24; csh: 18
file content (69 lines) | stat: -rw-r--r-- 1,821 bytes parent folder | download | duplicates (7)
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