]> mj.ucw.cz Git - ads2.git/blob - Makerules
*.stamp se maze
[ads2.git] / Makerules
1 ifndef R
2 R=..
3 endif
4
5 export TEXINPUTS=.:$(R):
6
7 all: $P.pdf
8
9 %.dvi: %.tex $(R)/lecnotes.tex $(R)/mjmac.tex
10         csplain $<
11
12 %.ps: %.dvi
13         dvips -D600 -o $@ -O-15.4mm,-15.4mm -t a5 $<
14
15 #%.pdf: %.dvi
16 #       dvipdfm -o $@ -x 9mm -y 9mm -p a5 -r 600 -z 9 $<
17
18 %.pdf: %.ps
19         ps2pdf13 $< $@
20
21 %-booklet.ps: %.ps
22         psbook <$< | pstops '2:0L(210mm,0)+1L(210mm,148mm)' | ../utils/pstopsfix | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/;s/^%%DocumentPaperSizes:.*/%%DocumentPaperSizes: a4\n%%Orientation: Landscape/' >$@
23
24 %-2in1.ps: %.ps
25         pstops '2:0L(210mm,0mm)+1L(210mm,148mm)' <$< | ../utils/pstopsfix | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/;s/^%%DocumentPaperSizes:.*/%%DocumentPaperSizes: a4\n%%Orientation: Landscape/' >$@
26
27 %.stamp: force
28         date '+%Y-%m-%d' >$@
29
30 force:
31
32 mostlyclean:
33         rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg
34
35 clean:: mostlyclean
36         rm -f *.ps *.pdf *.stamp
37
38 UPDIR=vyuka/0910/ads2
39 ifndef CUSTOM_UPLOAD
40 upload::
41         make $P.pdf $P.stamp
42         scp -C $P.pdf $P.stamp jabberwock:www/$(UPDIR)/
43         ssh jabberwock 'cd www && make'
44 endif
45
46 .SECONDARY:
47
48 .PHONY: force upload clean mostlyclean