X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=Makerules;h=4898d803bda3428dd3be1b36351ec577155bac35;hb=7be23343f72bc21cbcf857e126fcda43bd86407f;hp=c2a64928554341daaef2c9bef9c4bb9fed587e8c;hpb=fc12bb57ca44a624bd36ee77633b6df05d292912;p=ads2.git diff --git a/Makerules b/Makerules index c2a6492..4898d80 100644 --- a/Makerules +++ b/Makerules @@ -1,24 +1,33 @@ -export TEXINPUTS=.:..: +ifndef R +R=.. +endif -all: $P.ps +export TEXINPUTS=.:$(R): -%.dvi: %.tex ../lecnotes.tex ../mjmac.tex - csplain $< +all: $P.pdf -#%.pdf: %.tex ../lecnotes.tex ../mjmac.tex -# pdfcsplain $< +%.dvi: %.tex $(R)/lecnotes.tex $(R)/mjmac.tex + csplain $< %.ps: %.dvi dvips -D600 -o $@ -O-15.4mm,-15.4mm -t a5 $< -%.pdf: %.dvi - dvipdfm -o $@ -x 9mm -y 9mm -p a5 -r 600 -z 9 $< +#%.pdf: %.dvi +# dvipdfm -o $@ -x 9mm -y 9mm -p a5 -r 600 -z 9 $< + +%.pdf: %.ps + ps2pdf13 $< $@ %-booklet.ps: %.ps - psbook <$< | pstops '2:0L(210mm,0)+1L(210mm,148mm)' | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/;s/^%%DocumentPaperSizes:.*/%%DocumentPaperSizes: a4\n%%Orientation: Landscape/' >$@ + 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/' >$@ %-2in1.ps: %.ps - pstops '2:0L(210mm,0mm)+1L(210mm,148mm)' <$< | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/;s/^%%DocumentPaperSizes:.*/%%DocumentPaperSizes: a4\n%%Orientation: Landscape/' >$@ + 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/' >$@ + +%.stamp: force + date '+%Y-%m-%d' >$@ + +force: mostlyclean: rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg @@ -26,10 +35,14 @@ mostlyclean: clean:: mostlyclean rm -f *.ps *.pdf +UPDIR=vyuka/0910/ads2 ifndef CUSTOM_UPLOAD upload:: - make $P-booklet.ps - scp -C $P-booklet.ps jabberwock:www/vyuka/0708/ads2/$P-booklet.ps + make $P.pdf $P.stamp + scp -C $P.pdf $P.stamp jabberwock:www/$(UPDIR)/ + ssh jabberwock 'cd www && make' endif .SECONDARY: + +.PHONY: force upload clean mostlyclean