Src=wrules-v6 Bibs=local_refs.bib myrefs.bib refs.bib all : dirs tex bib tex tex done one : dirs tex done view: evince $(HOME)/tmp/$(Src).pdf & jacky: all publish publish: cp $(HOME)/tmp/$(Src).pdf $(HOME)/cost1.unbox.org done : embed @printf "\n\n\n==============================================\n" @printf "see output in $(HOME)/tmp/$(Src).pdf\n" @printf "==============================================\n\n\n" @printf "\n\nWarnings (may be none):\n\n" grep warning $(HOME)/tmp/${Src}.log # evince $(HOME)/tmp/$(Src).pdf dirs : - [ ! -d $(HOME)/tmp ] && mkdir $(HOME)/tmp tex : - pdflatex -output-directory=$(HOME)/tmp $(Src) embed : @ gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite \ -sOutputFile=$(HOME)/tmp/$(Src)-embedded.pdf $(HOME)/tmp/$(Src).pdf @ mv $(HOME)/tmp/$(Src)-embedded.pdf $(HOME)/tmp/$(Src).pdf bib : - cp $(Bibs) ~/tmp; cd ~/tmp; bibtex $(Src)