32 lines
615 B
Makefile
32 lines
615 B
Makefile
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
|
|
|
|
upload-last: last
|
|
scp $(LAST).pdf www.tobast:~/files/recettes_arcoloc.pdf
|