|
1 | | -LATEXCMD = pdflatex -shell-escape |
| 1 | +LATEXCMD = pdflatex -shell-escape -output-directory build/ |
| 2 | +export TEXINPUTS=.:content/tex/: |
2 | 3 | export max_print_line = 1048576 |
3 | 4 |
|
4 | | -.PHONY: help |
5 | 5 | help: |
6 | 6 | @echo "This makefile builds KACTL (KTH ACM Contest Template Library)" |
7 | 7 | @echo "" |
8 | 8 | @echo "Available commands are:" |
9 | | - @echo " make fast - to build the KACTL, quickly (only runs LaTeX once)" |
10 | | - @echo " make kactl - to build the KACTL" |
| 9 | + @echo " make fast - to build KACTL, quickly (only runs LaTeX once)" |
| 10 | + @echo " make kactl - to build KACTL" |
11 | 11 | @echo " make clean - to clean up the build process" |
12 | 12 | @echo " make veryclean - to clean up and remove kactl.pdf" |
13 | 13 | @echo " make help - to show this information" |
14 | 14 | @echo "" |
15 | 15 | @echo "For more information see the file 'doc/README'" |
16 | 16 |
|
17 | | -.PHONY: fast |
18 | | -fast: |
19 | | - cd build && $(LATEXCMD) kactl.tex </dev/null |
| 17 | +fast: | build |
| 18 | + $(LATEXCMD) content/kactl.tex </dev/null |
20 | 19 | cp build/kactl.pdf kactl.pdf |
21 | 20 |
|
22 | | -.PHONY: kactl |
23 | | -kactl: test-session.pdf |
24 | | - cd build && $(LATEXCMD) kactl.tex && $(LATEXCMD) kactl.tex |
| 21 | +kactl: test-session.pdf | build |
| 22 | + $(LATEXCMD) content/kactl.tex && $(LATEXCMD) content/kactl.tex |
25 | 23 | cp build/kactl.pdf kactl.pdf |
26 | 24 |
|
27 | | -.PHONY: clean |
28 | 25 | clean: |
29 | 26 | cd build && rm -f kactl.aux kactl.log kactl.tmp kactl.toc kactl.pdf kactl.ptc |
30 | 27 |
|
31 | | -.PHONY: veryclean |
32 | 28 | veryclean: clean |
33 | 29 | rm -f kactl.pdf test-session.pdf |
34 | 30 |
|
35 | | -test-session.pdf: content/test-session/chapter.tex |
36 | | - cd build && $(LATEXCMD) test-session.tex |
| 31 | +.PHONY: help fast kactl clean veryclean |
| 32 | + |
| 33 | +build: |
| 34 | + mkdir -p build/ |
| 35 | + |
| 36 | +test-session.pdf: content/test-session/test-session.tex content/test-session/chapter.tex | build |
| 37 | + $(LATEXCMD) content/test-session/test-session.tex |
37 | 38 | cp build/test-session.pdf test-session.pdf |
0 commit comments