-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (25 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TEXDIRS=$(filter-out CVS/,$(wildcard */))
genls=`pwd`/genls
genbigls=`pwd`/genbigls
MODE ?= nonstopmode
all: Revision.tex Recipe.pdf rmtemp
dirs:
for dir in ${TEXDIRS}; do $(MAKE) -C $$dir genls=${genls}; done
index.tex: ${TEXDIRS}
${genbigls} $^
Recipe.pdf: dirs index.tex RecipeMain.tex CoverLogo.pdf $(foreach file, $(wildcard */*.svg), $(addsuffix .pdf, $(basename $(file))))
pdflatex -interaction=$(MODE) Recipe && makeindex -q Recipe && pdflatex -interaction=$(MODE) Recipe
RecipeEbook.pdf: dirs index.tex RecipeMain.tex CoverLogo.pdf $(foreach file, $(wildcard */*.svg), $(addsuffix .pdf, $(basename $(file))))
pdflatex -interaction=$(MODE) RecipeEbook && makeindex -q RecipeEbook && pdflatex -interaction=$(MODE) RecipeEbook
Revision.tex: always
git rev-parse HEAD > $@
git status > /dev/null || echo Dirty >> $@
git rev-parse HEAD | qrencode -i -o Revision.png
%.pdf: %.svg
inkscape -A $@ $<
rmtemp:
rm -f Recipe.dvi Recipe.ps missfont.log Recipe.out
clean: rmtemp
for dir in ${TEXDIRS}; do $(MAKE) -C $$dir clean; done
rm -f Recipe.aux Recipe.idx Recipe.ilg Recipe.ind index.tex Revision.tex Recipe.log
.PHONY: all clean rmtemp dirs always