-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.mk
153 lines (131 loc) · 4.29 KB
/
examples.mk
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# example rules
.PHONY: examples examples-pdf examples-xe examples-lua \
examples-pdflatex-cm examples-pdflatex-pscyr\
examples-pdflatex-xcharter examples-xelatex-cmu examples-xelatex-msf\
examples-xelatex-liberation examples-lualatex-cmu examples-lualatex-msf\
examples-lualatex-liberation examples-presentation
examples-pdf: examples-pdflatex-cm examples-pdflatex-pscyr \
examples-pdflatex-xcharter
examples-xe: examples-xelatex-cmu examples-xelatex-msf\
examples-xelatex-liberation
examples-lua: examples-lualatex-cmu examples-lualatex-msf\
examples-lualatex-liberation
examples: examples-pdf examples-xe examples-lua examples-presentation
.DISSEXAMPLENAME = dissertation_$(subst -,_,$(subst examples-,,$(TARGET)))$(subst 0,_bibtex,$(subst 1,_biber,$(BIB)))$(subst 0,,$(subst 1,_draft,$(DRF)))
.SYNEXAMPLENAME = synopsis_$(subst -,_,$(subst examples-,,$(TARGET)))$(subst 0,_bibtex,$(subst 1,_biber,$(BIB)))$(subst 0,,$(subst 1,_draft,$(DRF)))$(subst 0,,$(subst 1,_footnote,$(FOOT)))$(subst 0,,$(subst 1,_bibgrouped,$(GRP)))
.PRESEXAMPLENAME = $(subst -,_,presentation$(BKND)$(subst 0,-bibtex,$(subst 1,-biber,$(BIB)))-notes-$(subst 0,off,$(subst 1,separate,$(subst 2,same,$(NOTES)))))
define dissertation-example #Canned Recipe
$(foreach DRF,0 1, \
$(foreach BIB,0 1, \
"$(MAKE)" dissertation \
BACKEND=$(BACKEND) \
FONTFAMILY=$(FONTFAMILY) \
ALTFONT=$(ALTFONT) \
TARGET=$(.DISSEXAMPLENAME) \
DRAFTON=$(DRF) \
USEBIBER=$(BIB); \
"$(MAKE)" BACKEND=$(BACKEND) TARGET=$(.DISSEXAMPLENAME) \
SOURCE=dissertation clean-target; \
))
endef
define synopsis-example #Canned Recipe
$(foreach DRF,0 1, \
$(eval FOOT:=0) \
$(eval GRP:=0) \
$(foreach BIB,0 1, \
"$(MAKE)" synopsis \
BACKEND=$(BACKEND) \
FONTFAMILY=$(FONTFAMILY) \
ALTFONT=$(ALTFONT) \
TARGET=$(.SYNEXAMPLENAME) \
DRAFTON=$(DRF) \
USEBIBER=$(BIB) \
BIBGROUPED=$(GRP) \
USEFOOTCITE=$(FOOT); \
"$(MAKE)" BACKEND=$(BACKEND) TARGET=$(.SYNEXAMPLENAME) \
SOURCE=synopsis clean-target; \
) \
$(eval BIB:=1) \
$(foreach FOOT,0 1, \
$(foreach GRP,0 1, \
"$(MAKE)" synopsis \
BACKEND=$(BACKEND) \
FONTFAMILY=$(FONTFAMILY) \
ALTFONT=$(ALTFONT) \
TARGET=$(.SYNEXAMPLENAME) \
DRAFTON=$(DRF) \
USEBIBER=$(BIB) \
BIBGROUPED=$(GRP) \
USEFOOTCITE=$(FOOT); \
"$(MAKE)" BACKEND=$(BACKEND) TARGET=$(.SYNEXAMPLENAME) \
SOURCE=synopsis clean-target; \
)))
endef
define presentation-example #Canned Recipe
$(foreach BKND,-pdf -pdfxe -pdflua, \
$(foreach BIB,0 1, \
$(foreach NOTES,0 1 2, \
"$(MAKE)" presentation \
NOTESON=$(NOTES) \
USEBIBER=$(BIB) \
BACKEND=$(BKND) \
TARGET=$(.PRESEXAMPLENAME); \
"$(MAKE)" TARGET=$(.PRESEXAMPLENAME) clean-target; \
)))
endef
examples-pdflatex-cm: TARGET=$@
examples-pdflatex-cm: BACKEND=-pdf
examples-pdflatex-cm: ALTFONT=0
examples-pdflatex-cm:
$(dissertation-example)
$(synopsis-example)
examples-pdflatex-pscyr: TARGET=$@
examples-pdflatex-pscyr: BACKEND=-pdf
examples-pdflatex-pscyr: ALTFONT=1
examples-pdflatex-pscyr:
$(dissertation-example)
$(synopsis-example)
examples-pdflatex-xcharter: TARGET=$@
examples-pdflatex-xcharter: BACKEND=-pdf
examples-pdflatex-xcharter: ALTFONT=2
examples-pdflatex-xcharter:
$(dissertation-example)
$(synopsis-example)
examples-xelatex-cmu: TARGET=$@
examples-xelatex-cmu: BACKEND=-pdfxe
examples-xelatex-cmu: FONTFAMILY=0
examples-xelatex-cmu:
$(dissertation-example)
$(synopsis-example)
examples-xelatex-msf: TARGET=$@
examples-xelatex-msf: BACKEND=-pdfxe
examples-xelatex-msf: FONTFAMILY=1
examples-xelatex-msf:
$(dissertation-example)
$(synopsis-example)
examples-xelatex-liberation: TARGET=$@
examples-xelatex-liberation: BACKEND=-pdfxe
examples-xelatex-liberation: FONTFAMILY=2
examples-xelatex-liberation:
$(dissertation-example)
$(synopsis-example)
examples-lualatex-cmu: TARGET=$@
examples-lualatex-cmu: BACKEND=-pdflua
examples-lualatex-cmu: FONTFAMILY=0
examples-lualatex-cmu:
$(dissertation-example)
$(synopsis-example)
examples-lualatex-msf: TARGET=$@
examples-lualatex-msf: BACKEND=-pdflua
examples-lualatex-msf: FONTFAMILY=1
examples-lualatex-msf:
$(dissertation-example)
$(synopsis-example)
examples-lualatex-liberation: TARGET=$@
examples-lualatex-liberation: BACKEND=-pdflua
examples-lualatex-liberation: FONTFAMILY=2
examples-lualatex-liberation:
$(dissertation-example)
$(synopsis-example)
examples-presentation:
$(presentation-example)