1 | TARGET = application
|
---|
2 |
|
---|
3 | TARGETLIST = $(TARGET).pdf
|
---|
4 | INTERMEDIATES = $(TARGET).dvi
|
---|
5 |
|
---|
6 | all: $(TARGETLIST)
|
---|
7 |
|
---|
8 | OPT = -file-line-error-style -interaction=nonstopmode
|
---|
9 |
|
---|
10 | .SILENT:
|
---|
11 |
|
---|
12 | define run-latex
|
---|
13 | @echo " - Producing $@ from" $<
|
---|
14 | ! (latex $(OPT) $< | grep -E \.tex:[0-9]*:\ )
|
---|
15 | bibtex --terse $(<:.tex=)
|
---|
16 | latex $(OPT) $< > /dev/null
|
---|
17 | latex $(OPT) $< > /dev/null
|
---|
18 | ! (latex $(OPT) $< | grep ^LaTeX\ Warning:\ )
|
---|
19 | # ! (latex $(OPT) $< | grep -E \.tex:[0-9]*:\ ) && \
|
---|
20 | # bibtex --terse $(<:.tex=); \
|
---|
21 | # cp icrc0974.bbl icrc0974.bbl~ && \
|
---|
22 | # sed icrc0974.bbl~ -e 's/^\(.*\)\\url\(.*\)%/\1\\url\2/' > icrc0974.bbl && \
|
---|
23 | # (latex $(OPT) $< > /dev/null) && \
|
---|
24 | # (latex $(OPT) $< > /dev/null) && \
|
---|
25 | # ! (latex $(OPT) $< | grep ^LaTeX\ Warning:\ )
|
---|
26 | # && \
|
---|
27 | # ! (latex $(OPT) $< | grep ^LaTeX\ Warning:\ )
|
---|
28 | endef
|
---|
29 |
|
---|
30 | %.dvi: %.dtx
|
---|
31 | $(run-latex)
|
---|
32 |
|
---|
33 | %.dvi: %.tex
|
---|
34 | $(run-latex)
|
---|
35 |
|
---|
36 | %.ps: %.dvi
|
---|
37 | @echo " - Producing $@ from" $<
|
---|
38 | dvips -q $< $@~ && mv $@~ $@
|
---|
39 |
|
---|
40 | %.pdf: %.dvi
|
---|
41 | @echo " - Producing $@ from" $<
|
---|
42 | dvipdf -q $< $@~ && mv $@~ $@
|
---|
43 |
|
---|
44 | %: %.dvi
|
---|
45 | @echo " - Producing $@.pdf from" $<
|
---|
46 | dvipdf -q $<
|
---|
47 |
|
---|
48 | %.ps.gz: %.ps
|
---|
49 | @echo " - Producing booklet $@ from" $<
|
---|
50 | psbook -q $< | psnup -q -2 | pstops -q 2:0,1VH | gzip -c -9 > $@
|
---|
51 |
|
---|
52 | %.bdf: %.ps.gz
|
---|
53 | @echo " - Producing booklet $@ from" $<
|
---|
54 | gzip -cd $< | ps2pdf - $@
|
---|
55 |
|
---|
56 | clean:
|
---|
57 | @rm -f $(INTERMEDIATES) $(TARGETLIST) *.dvi *.aux *.blg *.lof *.log *.lot *.toc *.bbl *.bdf
|
---|
58 |
|
---|
59 | mrproper: clean
|
---|
60 | @rm -f *~
|
---|