]> mj.ucw.cz Git - ga.git/blobdiff - Makerules
Merge branch 'master' of git+ssh://git.ucw.cz/home/mj/GIT/ga
[ga.git] / Makerules
index 0877f11167701fb777b3f92f63e9b098de62fd60..5c4c60490b1221cafc914cc77d9eff81a45228ee 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -1,30 +1,33 @@
-all: $P.ps
+export TEXINPUTS=.:..//:
 
-%.dvi: %.tex ../sgr.tex ../ga.bib
-       csplain $< && if grep -q citation $*.aux ; then bibtex $* && csplain $< && csplain $< ; fi
+all: $P.pdf
 
 %.pdf: %.tex ../sgr.tex ../ga.bib
-       pdfcsplain $<
+       pdfcsplain $< && if grep -q citation $*.aux ; then bibtex $* && pdfcsplain $< && pdfcsplain $< ; fi
 
-%.ps: %.dvi
-       dvips -D600 -o $@ -O-15.4mm,-15.4mm -t a5 $<
+%-2in1.pdf: %-uncompressed.pdf
+       pspdftool 'nup(2, paper=a4)' $< $@
 
-%-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/' >$@
+%-booklet.pdf: %-uncompressed.pdf
+       pspdftool 'book nup(2, paper=a4)' $< $@
 
-%-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/' >$@
+%-uncompressed.pdf: %.pdf
+       qpdf --object-streams=disable --stream-data=uncompress $< $@
+
+%.pdf: %.asy
+       asy -f pdf -tex pdftex $<
 
 mostlyclean:
-       rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg
+       rm -f *.dvi *.log *~ core *.o *.aux *.bbl *.blg *.toc
 
 clean:: mostlyclean
        rm -f *.ps *.pdf
 
 ifndef CUSTOM_UPLOAD
 upload::
-       make $P-booklet.ps
-       scp -C $P-booklet.ps jabberwock:www/vyuka/ga/$P-booklet.ps
+       make $P.pdf
+       scp -C $P.pdf jabberwock:www/static/vyuka/ga/
+       ssh jabberwock 'cd web && make'
 endif
 
 .SECONDARY: