recettes/Makefile

33 lines
615 B
Makefile
Raw Normal View History

2018-03-02 23:24:27 +01:00
WHOLE=whole
LAST=last
HEADER=header.tex
all: whole last
whole: $(WHOLE:=.pdf)
last: $(LAST:=.pdf)
#######
%.pdf: %.tex
latexmk -pdf $<
$(WHOLE).tex: $(HEADER) recettes/*.tex
cp $(HEADER) $@
for recipe in recettes/*.tex; do echo -e "\t\\input{$$recipe"} >> $@; done
echo "\end{document}" >> $@
$(LAST).tex: $(HEADER) recettes/*.tex
cp $(HEADER) $@
echo -e "\t\input{$$(ls -1t recettes/*.tex | head -n 1)}" >> $@
echo "\end{document}" >> $@
clean:
rm -f $(WHOLE).{tex,pdf} $(LAST).{tex,pdf} *.aux *.fdb_latexmk *.fls *.log
2018-03-03 00:10:04 +01:00
upload-last: last
scp $(LAST).pdf www.tobast:~/files/recettes_arcoloc.pdf