recettes/Makefile

34 lines
692 B
Makefile
Raw Permalink Normal View History

2018-03-02 23:24:27 +01:00
WHOLE=whole
LAST=last
2018-03-03 13:08:35 +01:00
SHELL:=/bin/bash
2018-03-02 23:24:27 +01:00
HEADER=header.tex
all: whole last
whole: $(WHOLE:=.pdf)
last: $(LAST:=.pdf)
#######
%.pdf: %.tex
latexmk -pdf $<
$(WHOLE).tex: $(HEADER) recettes/*.tex
2018-03-03 00:12:30 +01:00
sed 's/<>/version complète/g' $(HEADER) > $@
2018-03-02 23:24:27 +01:00
for recipe in recettes/*.tex; do echo -e "\t\\input{$$recipe"} >> $@; done
echo "\end{document}" >> $@
$(LAST).tex: $(HEADER) recettes/*.tex
2018-03-03 00:12:30 +01:00
sed 's/<>/dernière recette/g' $(HEADER) > $@
2018-03-02 23:24:27 +01:00
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