]> 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 501683054ef33539bfd129b667139d92ca1d8967..5c4c60490b1221cafc914cc77d9eff81a45228ee 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -1,34 +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
-       pdfcsplain $<
+%.pdf: %.tex ../sgr.tex ../ga.bib
+       pdfcsplain $< && if grep -q citation $*.aux ; then bibtex $* && pdfcsplain $< && pdfcsplain $< ; fi
 
-%-700.tex: %.tex
-       ( echo '\magnification=700' ; cat $< ) >$@
+%-2in1.pdf: %-uncompressed.pdf
+       pspdftool 'nup(2, paper=a4)' $< $@
 
-%.ps: %.dvi
-       dvips -D600 -o $@ -O-0.5in,-0.5in -t a4 $<
+%-booklet.pdf: %-uncompressed.pdf
+       pspdftool 'book nup(2, paper=a4)' $< $@
 
-%-a5.ps: %-700.dvi
-       dvips -D600 -o $@ -O-1in,-1in -T148mm,210mm $<
+%-uncompressed.pdf: %.pdf
+       qpdf --object-streams=disable --stream-data=uncompress $< $@
 
-%-booklet.ps: %-a5.ps
-       psbook <$< | pstops '2:0L(210mm,0)+1L(210mm,148mm)' | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/' >$@
-
-%-2in1.ps: %-a5.ps
-       pstops '2:0L(212mm,0mm)+1L(212mm,150mm)' <$< | sed 's/^%%BoundingBox: .*/%%BoundingBox: 0 0 595 842/' >$@
+%.pdf: %.asy
+       asy -f pdf -tex pdftex $<
 
 mostlyclean:
-       rm -f *.dvi *.log *~ core *.o *-700.tex *-a5.ps *.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.ps
-       scp -C $P.ps jabberwock:www/vyuka/ga/$P.ps
+       make $P.pdf
+       scp -C $P.pdf jabberwock:www/static/vyuka/ga/
+       ssh jabberwock 'cd web && make'
+endif
 
 .SECONDARY: