pstricks: kleines beispiel vom herrn perner und makefile spass von mir
[hwmod.git] / spec / Makefile
1 SHELL := bash
2 PROJECT = spec
3
4 all: protocol
5
6 protocol: $(PROJECT).tex $(subst .dia,.png,$(shell ls *.dia)) $(subst .tex,.pdf,$(shell ls sm/*.tex))
7         pdflatex $(PROJECT).tex
8         pdflatex $(PROJECT).tex
9
10 %.png: %.dia
11         dia $< -e $@ -t png
12
13 %.pdf: %.tex
14         latex -output-directory=sm $<
15         dvips $(subst .tex,.dvi,$<) -o $(subst .tex,.ps,$<)
16         ps2pdf $(subst .tex,.ps,$<) $@
17         pdfcrop $@ $(subst .pdf,.pdf2,$@)
18         mv $(subst .pdf,.pdf2,$@) $@
19         rm sm/{*.dvi,*.ps,*.aux,*.log}
20
21 clean:
22         -rm -f {,sm/}{*.aux,*.log,*.dvi,*.toc,*.out,*.pdf,*.png}