ALL = \ event-info-single.pdf \ event-info.pdf \ SEND_FILES = $(ALL) all: $(ALL) fripost-mayday-flyer.pdf: fripost-mayday-flyer-single.pdf pdftk $< cat 1 1 output $@ event-info-single.pdf: master.tex flygblad-lagring-foer-delning-2018.pdf jobname=$(basename $@) ;\ log=$(addsuffix .log, $(basename $@)) ;\ count=5 ;\ pdflatex -jobname $$jobname $< ;\ while egrep -s 'Rerun (LaTeX|to get cross-references right)' $$log && [ $$count -gt 0 ] ;\ do echo "Rerunning latex...." ; pdflatex -jobname $$jobname $< ;\ count=`expr $$count - 1`;\ done; # General cases %.pdf: %-single.pdf pdftk $< cat 1 1 output $@ %.pdf: %.odt libreoffice --headless "-env:UserInstallation=file:///tmp/lo-$$" --convert-to pdf $< %.png: %.pdf convert $< $@ # Sends to fripost.org for publication send: rsync -ruvp --chmod=Dugo+rx,Fugo+r $(SEND_FILES) www.fripost.org:/var/www/fripost.org/material/ @echo; echo Now avialable as; for f in $(SEND_FILES); do echo " - https://fripost.org/material/$$f"; done clean: rm -fr $(ALL) SHELL = /bin/bash