-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
executable file
·35 lines (27 loc) · 1.03 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
#! /usr/bin/make -f
# display usage help
usage:
@echo "Type 'make ACTION', where ACTION is one of the following:"
@echo
@echo "clean -- Remove all temporary LaTeX files"
@echo
@echo "all -- Recompile all LaTeX files"
@echo
# clean up temporary LaTeX files
clean:
rm -f *~ *.aux *.log *.nav *.out *.rel *.snm *.toc *.vrb
cd tex && rm -f *~ *.aux *.log *.nav *.out *.rel *.snm *.toc *.vrb
# remake all LaTeX files
all: $(patsubst tex/%.tex,%.pdf,$(wildcard tex/*.tex))
# the default wildcard rule for generating PDFs from `.tex` files
%.pdf: tex/%.tex tex/s3it.sty tex/beamerthemes3it.sty
cd tex \
&& pdflatex -output-directory $(CURDIR) -halt-on-error $< \
&& pdflatex -output-directory $(CURDIR) -halt-on-error $<
# additional per-file dependencies
#
# these were generated from `\includegraphics` commands in the LaTeX source with::
#
# $ egrep --only-matching '\\includegraphics\[.+\]\{([A-Za-z0-9/._-]+)\}' *.tex \
# | sed -r -e 's|^([a-zA-Z0-9]+)\.tex:\\includegraphics.+\{([a-zA-Z0-9/._-]+)\}|\1.pdf: \1.tex \2|'
#