Rev | Line | |
---|
[2] | 1 | # Rick van der Zwet <rick@wzoeterwoude.net>
|
---|
| 2 | # Licence: BSD
|
---|
| 3 | # Descrip: LaTex file parser
|
---|
| 4 | # $Id: latex.mk 571 2008-04-20 17:31:04Z rick $
|
---|
| 5 |
|
---|
| 6 | TARGET = report
|
---|
| 7 | LATEX = latex
|
---|
| 8 | XDVI = xdvi
|
---|
| 9 | TEX = latex -halt-on-error
|
---|
| 10 | DVIPDF = dvipdf
|
---|
| 11 | ASPELL = aspell
|
---|
[68] | 12 | ASPELL_ARGS = -c --mode=tex -x
|
---|
[22] | 13 |
|
---|
| 14 | #XXX: Make me dynamic
|
---|
| 15 | VIEWPDF = evince
|
---|
[2] | 16 | .SUFFIXES: .pdf
|
---|
| 17 |
|
---|
[129] | 18 | PAGE ?= 1
|
---|
| 19 |
|
---|
[2] | 20 | help:
|
---|
| 21 | @echo "Usage Makefile <option>"
|
---|
| 22 |
|
---|
| 23 | doc-all: doc-distclean buildpdf
|
---|
| 24 |
|
---|
| 25 | view: viewpdf
|
---|
| 26 |
|
---|
| 27 | viewdvi: builddvi
|
---|
[129] | 28 | $(XDVI) $(TARGET) +$(PAGE)
|
---|
[2] | 29 |
|
---|
[68] | 30 | builddvi: $(SOURCE) $(TARGET).dvi
|
---|
[2] | 31 |
|
---|
| 32 | doc-clean:
|
---|
[68] | 33 | rm -vf *.aux *.log *toc *.out *.bak *.m.tex
|
---|
[2] | 34 |
|
---|
| 35 | doc-distclean: doc-clean
|
---|
| 36 | rm -vf $(TARGET).dvi $(TARGET).pdf $(PROGRAM)
|
---|
| 37 |
|
---|
[68] | 38 | buildpdf: $(SOURCE) $(TARGET).pdf
|
---|
[2] | 39 |
|
---|
| 40 | viewpdf: buildpdf
|
---|
[129] | 41 | $(VIEWPDF) -p $(PAGE) $(TARGET).pdf
|
---|
[2] | 42 |
|
---|
| 43 | spell: spell-en
|
---|
| 44 |
|
---|
| 45 | spell-nl: $(TARGET).tex
|
---|
| 46 | $(ASPELL) -l nl -p ~/aspell-n.dic $(ASPELL_ARGS) $<
|
---|
| 47 |
|
---|
| 48 | spell-en: $(TARGET).tex
|
---|
| 49 | $(ASPELL) -l en -p ~/aspell-en.dic $(ASPELL_ARGS) $<
|
---|
| 50 |
|
---|
| 51 | .dvi.pdf:
|
---|
| 52 | $(DVIPDF) $? $@
|
---|
| 53 |
|
---|
| 54 | .tex.dvi:
|
---|
| 55 | $(TEX) $? $@
|
---|
| 56 | $(TEX) $? $@
|
---|
| 57 |
|
---|
| 58 | .gs.png:
|
---|
| 59 | $(GNUPLOT) $?
|
---|
[68] | 60 |
|
---|
| 61 | %.m.tex: %.m
|
---|
| 62 | highlight --include-style --linenumbers --no-doc \
|
---|
| 63 | --latex --input $< --output $@
|
---|
Note:
See
TracBrowser
for help on using the repository browser.