-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
33 lines (31 loc) · 893 Bytes
/
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
name := primer
viewer := mupdf
sections := $(wildcard sections/*.tex)
all: $(name).pdf
view: $(name).pdf
$(viewer) $(name).pdf
$(name).pdf: $(name).tex $(sections) $(name).bib
mkdir -p build
pdflatex -output-directory build/ $(name)
bibtex build/$(name)
pdflatex -output-directory build/ $(name)
pdflatex -output-directory build/ $(name)
mv build/$(name).pdf .
polyglot: polyglot/$(name).pdf
polyglot/$(name).zip: FORCE
mkdir -p polyglot
make -C examples distclean
zip -r polyglot/$(name).zip examples
# You found it Arthur! :) polyglot PDF from PoC||GTFO.
polyglot/$(name).pdf: $(name).pdf polyglot/$(name).zip
cat $(name).pdf polyglot/$(name).zip > polyglot/$(name).pdf
zip -A polyglot/$(name).pdf
distribute: distclean all polyglot
cp polyglot/$(name).pdf concepts-primer.pdf
clean:
rm -rf build
distclean: clean
rm -rf polyglot
rm -f $(name).pdf
.PHONY: all clean
FORCE: