diff --git a/.gitignore b/.gitignore index 0045f63..38f18ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /deques /deques.cmi /deques.cmo -/deques.mli \ No newline at end of file +/deques.mli +/jacm-final.pdf +/jacm-final-page*.pdf +/jacm-final-crop-*-*-*-*-page*.pdf \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 90de8bf..b620288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,12 @@ +sudo: false language: c addons: apt: packages: - - ocaml-interp + - ocaml + - ocaml-findlib + - libpodofo-utils script: - make print-tool-versions diff --git a/Makefile b/Makefile index 6c687e8..50d5d29 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +.SECONDEXPANSION: + .PHONY: all all: deques deques.mli Makefile @@ -8,5 +10,29 @@ deques.mli: deques.ml Makefile ocamlc -i $< > $@ .PHONY: print-tool-versions -print-tool-versions: +print-tool-versions: Makefile ocamlc -version + +jacm-final.pdf: Makefile + wget http://www.math.tau.ac.il/~haimk/adv-ds-2000/jacm-final.pdf + +#sudo apt-get install libpodofo-utils to get podofobox +jacm-final-page%.pdf: jacm-final.pdf Makefile + pdftk P=$< cat P$* output $@ + +# jacm-final-crop-LEFT-TOP-WIDTH-HEIGHT-pagePAGE.pdf +# Original page width: 488, original page height: 721. +# podofobox expects LEFT BOTTOM WIDTH HEIGHT, multiplied by 100. +jacm-final-crop-%.pdf: $$(shell echo '%.pdf' | sed -e 's/^[-0-9]*-page/jacm-final-page/') + f () { \ + podofobox $< $@ \ + media $$(( ($$1) * 100 )) \ + $$(( ( 720 - ($$2) - ($$4) ) * 100 )) \ + $$(( ($$3) * 100 )) \ + $$(( ($$4) * 100 )); \ + }; \ + f $$(echo '$*' | sed -e 's/page[0-9]*$$//' -e 's/-/ /g') + +.PHONY: clean +clean: Makefile + rm jacm-final-page*.pdf jacm-final-crop-*-page*.pdf