-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (50 loc) · 1.58 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
PANDOC=/usr/bin/pandoc
TARGET_DIR=docs
TARGET=SICPNotes
AUTHOR=Caesar X Insanium
FLAGS= --pdf-engine=xelatex \
--toc \
--variable documentclass=report \
--variable title="$(TARGET)" \
--variable author="$(AUTHOR)" \
--variable margin-left=1in \
--variable margin-right=1in \
--variable margin-top=1in \
--variable margin-bottom=1in \
#--variable classoption=landscape,twocolumn
SOURCES= Notes/Procedures.md \
Notes/DataAbstractions.md \
Notes/ModularityObjectsStateIntro.md \
Notes/AssignmentAndLocalState.md \
Notes/EnvironmentModelEvaluation.md \
Notes/ModelingMutableData.md \
Notes/Concurrency.md \
Notes/Streams.md \
Notes/MetalinguisticAbstraction.md \
Notes/MetacircularEvaluator.md \
Notes/LazyEvaluation.md \
Notes/NondeterministicComputing.md \
Notes/LogicProgramming.md \
Notes/RegisterMachines.md \
Notes/DesigningRegister.md \
Notes/RegisterSimulator.md \
Notes/AllocationGarbageCollection.md \
Notes/ControlEvaluator.md \
Notes/Compilation.md
# allow force rebuild
.PHONY: $(TARGET_DIR) $(TARGET_DIR)/$(TARGET).pdf $(TARGET_DIR)/$(TARGET).epub
$(TARGET_DIR)/$(TARGET).pdf: $(SOURCES)
$(PANDOC) $(FLAGS) $? -o $@
$(TARGET_DIR)/$(TARGET).epub: $(SOURCES)
$(PANDOC) $(FLAGS) $? -o $@
epub: $(TARGET_DIR)/$(TARGET).epub
$(TARGET_DIR):
mkdir $@
clean:
rm -rf $(TARGET_DIR)
# useful flags
# shift to right
# --shift-heading-level-by=-1
# --defaults
# we can also have a file called defaults.yaml
# next time we move to a full defaults.yaml file instead of Makefile