| Line | |
|---|
| 1 | TARGET = paper
|
|---|
| 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) $< > /dev/null
|
|---|
| 15 | latex $(OPT) $< > /dev/null
|
|---|
| 16 | (latex $(OPT) $< )
|
|---|
| 17 | endef
|
|---|
| 18 |
|
|---|
| 19 | #define run-latex
|
|---|
| 20 | # @echo " - Producing $@ from" $<
|
|---|
| 21 | # ! (latex $(OPT) $< | grep -E \.tex:[0-9]*:\ )
|
|---|
| 22 | # bibtex --terse $(<:.tex=)
|
|---|
| 23 | # latex $(OPT) $< > /dev/null
|
|---|
| 24 | # latex $(OPT) $< > /dev/null
|
|---|
| 25 | # ! (latex $(OPT) $< | grep ^LaTeX\ Warning:\ )
|
|---|
| 26 | #endef
|
|---|
| 27 |
|
|---|
| 28 | %.dvi: %.dtx
|
|---|
| 29 | $(run-latex)
|
|---|
| 30 |
|
|---|
| 31 | %.dvi: %.tex %.bib
|
|---|
| 32 | $(run-latex)
|
|---|
| 33 |
|
|---|
| 34 | %.ps: %.dvi
|
|---|
| 35 | @echo " - Producing $@ from" $<
|
|---|
| 36 | dvips -q $< $@~ && mv $@~ $@
|
|---|
| 37 |
|
|---|
| 38 | %.pdf: %.dvi
|
|---|
| 39 | @echo " - Producing $@ from" $<
|
|---|
| 40 | dvipdf -q $< $@~ && mv $@~ $@
|
|---|
| 41 |
|
|---|
| 42 | %: %.dvi
|
|---|
| 43 | @echo " - Producing $@.pdf from" $<
|
|---|
| 44 | dvipdf -q $<
|
|---|
| 45 |
|
|---|
| 46 | %.ps.gz: %.ps
|
|---|
| 47 | @echo " - Producing booklet $@ from" $<
|
|---|
| 48 | psbook -q $< | psnup -q -2 | pstops -q 2:0,1VH | gzip -c -9 > $@
|
|---|
| 49 |
|
|---|
| 50 | %.bdf: %.ps.gz
|
|---|
| 51 | @echo " - Producing booklet $@ from" $<
|
|---|
| 52 | gzip -cd $< | ps2pdf - $@
|
|---|
| 53 |
|
|---|
| 54 | clean:
|
|---|
| 55 | @rm -f $(INTERMEDIATES) $(TARGETLIST) *.dvi *.aux *.blg *.lof *.log *.lot *.toc *.bbl *.bdf
|
|---|
| 56 |
|
|---|
| 57 | mrproper: clean
|
|---|
| 58 | @rm -f *~
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.