-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
228 lines (162 loc) · 5.61 KB
/
Makefile
File metadata and controls
228 lines (162 loc) · 5.61 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
## This is Homework, a screens project directory
## Rules and products here. evaluation/ is only for the secret files (current answers, I guess)
## https://avenue.cllmcmaster.ca/d2l/home/757445
current: target
-include target.mk
-include makestuff/perl.def
######################################################################
# Content
vim_session:
bash -cl "vmt"
######################################################################
pardirs += evaluation Life_tables
pushdir = ../web/materials
alldirs += $(pardirs)
colddirs += $(pardirs)
## hotdirs += $(pardirs)
## Pull while working, but don't push repeatedly?
Ignore += $(pardirs)
pull: $(pardirs:%=%.pull)
######################################################################
## Assignments (see also rmd R background material below; R assignments are in this section)
Ignore += *.asn.* *.key.* *.rub.*
## Intro (NFC)
intro.asn.pdf: evaluation/intro.ques
intro.key.pdf: evaluation/intro.ques
## Population growth
## For-credit 2018, 2019, 2020, 2021, 2026
pg.asn.pdf: evaluation/pg.ques
pg.key.pdf: evaluation/pg.ques
pg.rub.pdf: evaluation/pg.ques
## NFC 2020
## FC 2024
life_history.asn.pdf: evaluation/life_history.ques
life_history.key.pdf: evaluation/life_history.ques
life_history.rub.pdf: evaluation/life_history.ques
## For-credit 2020; 2021
## Documentation stuff lives in the web directory
evaluation/competition.ques: evaluation/comp_par.R ;
## competition.asn.pdf: evaluation/competition.ques
## competition.key.pdf: evaluation/competition.ques evaluation/comp_par.R
## competition.rub.pdf: evaluation/competition.ques
## For-credit 2022, may be a bit rough after its vacation
expl.asn.pdf: evaluation/expl.ques
expl.key.pdf: evaluation/expl.ques
expl.rub.pdf: evaluation/expl.ques
expl_figures.Rout: evaluation/expl_figures.R
$(pipeR)
######################################################################
evaluation/comp_figures.Rout.pdf:
evaluation/%.pdf: $(wildcard evaluation/*.R)
$(justmakethere)
######################################################################
## Main lect.pl products
Sources += asn.tmp copy.tex
%.ques.fmt: lect/ques.format lect/fmt.pl
$(PUSHSTAR)
%.asn.tex: %.qq asn.tmp asn.ques.fmt talk/lect.pl
$(PUSH)
%.key.tex: %.qq asn.tmp key.ques.fmt talk/lect.pl
$(PUSH)
%.rub.tex: %.qq asn.tmp rub.ques.fmt talk/lect.pl
$(PUSH)
##################################################################
## qq pipeline
## Pre-knit markup
Ignore += *.ques
%.ques: evaluation/%.ques lect/knit.fmt talk/lect.pl
$(PUSH)
## Knit
Ignore += *.qq
knit = echo 'knitr::knit("$<", "$@")' | R --vanilla
.PRECIOUS: %.qq
%.qq: %.ques
$(knit)
##################################################################
## What if we make and export html?? Stand-alone?
## rmd pipelining (much to be done!)
# r.rmdout: r.rmd
rmd = $(wildcard *.rmd)
Ignore += *.yaml.md *.rmd.md *.export.md
Sources += $(rmd)
Ignore += *.export.* *_files/
## Direct translation
%.rmd.md: %.rmd
Rscript -e 'library("rmarkdown"); render("$<", output_format="md_document", output_file="$@")'
## Add headers
%.yaml.md: %.rmd Makefile
perl -nE "last if /^$$/; print; END{say}" $< > $@
%.export.md: %.yaml.md %.rmd.md
$(cat)
## r.rmdout: r.rmd
%.rmdout: %.export.md
- $(RMR) $(pushdir)/$*.rmd_files
$(CP) -r $< $(pushdir)
- $(CP) -r $< $*.rmd_files $(pushdir)
shiprmd = $(rmd:rmd=rmdout)
shiprmd: $(shiprmd)
## bd.rmdout: bd.rmd
## bd_notime.rmdout: bd_notime.rmd
######################################################################
### Some misunderstood messiness here 2020 Feb 14 (Fri)
### ADD point outline to future HWs!
######################################################################
## Regulation (uses some R, lives here, points to wiki)
## For-credit 2018, 2020 maybe other times, 2024, 2026
regulation.asn.pdf: evaluation/regulation.ques evaluation/regulation.R
regulation.key.pdf: evaluation/regulation.ques
regulation.rub.pdf: evaluation/regulation.ques
## Pipelining with .R files
## 2019 Mar 10 (Sun)
regulation.qq: evaluation/regulation.rda
Ignore += bd.R
## There is some weird spinny makiness going on here.
## regulation.key.pdf regulation.rub.pdf: regulation.Rout-0.pdf regulation.Rout-1.pdf regulation.Rout-2.pdf regulation.Rout-3.pdf regulation.Rout-4.pdf
######################################################################
## An allee question that has fallen between the cracks. Could be added to the previous or following assignment
## Previous assignment currently has a detailed Allee question, though.
allee.asn.pdf: evaluation/allee.ques
## Structure assignment
## For-credit 2018; this depends on the long version of the unit
## 2021; the Euler equation part is suppressed
## Generally use Euler when NFC
## 2024 NFC with Euler
## 2026 NFC with Euler
structure.asn.pdf: evaluation/structure.ques
structure.key.pdf: evaluation/structure.ques
structure.rub.pdf: evaluation/structure.ques
## lect and talk resources
Ignore += lect
.PRECIOUS: lect/%
lect/%:
$(MAKE) lect
lect: dir=makestuff
lect:
$(linkdir)
Ignore += talk
.PRECIOUS: talk/%
talk/%:
$(MAKE) talk
talk: dir=makestuff/newtalk
talk:
$(linkdirname)
######################################################################
### Makestuff
Sources += Makefile README.md
## include content.mk
Ignore += makestuff
msrepo = https://github.com/dushoff
Makefile: makestuff/Makefile
makestuff/Makefile:
git clone $(msrepo)/makestuff
ls $@
-include makestuff/os.mk
## Seems ancient, do we use it?
## -include makestuff/projdir.mk
-include makestuff/pipeR.mk
-include makestuff/texi.mk
-include makestuff/pandoc.mk
-include makestuff/hotcold.mk
-include makestuff/pdfpages.mk
-include makestuff/git.mk
-include makestuff/visual.mk