-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·45 lines (29 loc) · 948 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
34
35
36
37
38
39
40
41
42
43
44
45
NOTE_NAMES = DrudeTheory DerivingThomasFermi SummaryOfLindhardDerivation ReducingLindhard LindhardExplicitParts QubitRelaxation NamSCResponse
NOTE_DIRS = $(addprefix notes/, $(addsuffix /, $(NOTE_NAMES)))
NOTE_PDFS = $(join $(NOTE_DIRS), $(addsuffix .pdf, $(NOTE_NAMES)))
NOTE_TEXS = $(NOTE_PDFS:.pdf=.tex)
NOTE_DEPEND = $(NOTE_TEXS)
#DEFINE ALL THE INDIVIDUAL NOTE DEPENDENCIES HERE AS CONSTANTS
LATEXMK = latexmk -use-make -g -pdf -dvi- -ps-
all: main
main: main.pdf $(NOTE_PDFS)
parts: $(NOTE_PDFS)
#TARGETS FOR INDIVIDUAL NOTE PDFS
%.pdf: %.tex
cd $(<D); $(LATEXMK) $(<F)
main.pdf: main.tex $(NOTE_DEPEND)
$(LATEXMK) main.tex
.PHONY: tidy clean docs publish
tidy:
latexmk -c
for dir in $(NOTE_DIRS); do\
(cd $$dir; latexmk -c) ;\
done;
clean:
latexmk -C
for dir in $(NOTE_DIRS); do\
(cd $$dir; latexmk -C) ;\
done;
rm docs/*.pdf
publish: main parts
find . -path ./docs -prune -o -name "*.pdf" -exec cp {} docs \;