-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
446 lines (314 loc) · 11.8 KB
/
Makefile
File metadata and controls
446 lines (314 loc) · 11.8 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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
## Todo: make private (bitbucket) repo for mark tracking
## Simplify this repo (too-too many submodules, tracked too automatically)
# Tests
## Includes test and marking machinery (because both depend on scramble stuff)
### Hooks for the editor to set the default target
-include target.mk
##################################################################
# make files
Sources = Makefile README.md LICENSE.md
ms = makestuff
Sources += $(ms)
Makefile: $(ms)/Makefile
$(ms)/%.mk: $(ms)/Makefile ;
$(ms)/Makefile:
git submodule update -i
-include $(ms)/os.mk
-include $(ms)/perl.def
##################################################################
## Submodules
## material is actually a good candidate for a submodule
## Remake tests and keys by setting the clock back from here. I guess.
## Why did it apparently not sync from school on Tue??
Sources += material
mdirs += material
material:
git submodule add -b master https://github.com/Bio3SS/Evaluation_materials $@
material/%:
$(MAKE) material
$(makethere)
## Make assign into a resting subclone! Don't need to all it. Ever.
## Try not to use it, not to make there, etc. 2019 Feb 04 (Mon)
## Immediately bailed on this plan!!! 2019 Feb 04 (Mon)
## Resuscitated assign as a clone and made:
## pullup; pullup; rmsync; rmsync; all!
clonedirs += assign
assign:
git clone https://github.com/Bio3SS/Assignments $@
cd assign && $(MAKE) Makefile && $(MAKE) Makefile
assign/%: ; $(MAKE) assign; $(makethere)
## There is also a private repo called Grading_scripts (out of date)
## and a public successor called Grading
## It might be good to farm the grading scripts out to Grading,
## and to use Grading_scripts to keep grade files that we might want to diff
## Grading has poll everywhere stuff
## It used to be a submodule of Tests, but I'm trying to reverse that
## Or something
##################################################################
### Directories
Makefile: talk lect material
Ignore += talk lect
talk: dir=$(ms)/newtalk
talk:
$(linkdirname)
lect: dir=$(ms)
lect:
$(linkdir)
### Formats
Ignore += null.tmp
null.tmp:
touch $@
Ignore += *.fmt
%.test.fmt: lect/test.format lect/fmt.pl
$(PUSHSTAR)
%.select.fmt: lect/select.format lect/fmt.pl
$(PUSHSTAR)
######################################################################
## Multiple choice banks
# Combined test banks
## Templates
# null is made; list .tmp files here if necessary
# Sources += $(wildcard *.tmp)
## Formulas
Sources += $(wildcard *.formulas)
Sources += $(wildcard formula*.tex)
## Could NOT make this work with -e!
Sources += archive.pl
archiveQuestions:
perl -pi -f archive.pl material/*.bank
Ignore += midterm1.bank
midterm1.bank: midterm1.formulas material/linear.bank material/nonlinear.bank material/structure.bank
$(cat)
Ignore += midterm2.bank
midterm2.bank: midterm2.formulas material/linear.bank material/nonlinear.bank material/structure.bank material/life_history.bank material/comp.bank
$(cat)
Ignore += final.bank
final.bank: final.formulas material/linear.bank material/nonlinear.bank material/structure.bank material/life_history.bank material/comp.bank material/pred.bank material/disease.bank
$(cat)
final.5.test.pdf: final.formulas
final.1.key.pdf: final.formulas
final.test.pdf: final.formulas
final.key.pdf: final.formulas
final.5.final.pdf: final.formulas
## %.bank.test: %.bank null.tmp bank.select.fmt $(ms)/talk/lect.pl
## $(PUSH)
######################################################################
midterm2.mc:
# MC selection
# Use lect/select.format
.PRECIOUS: %.mc
Ignore += *.mc
%.mc: %.bank null.tmp %.select.fmt $(ms)/newtalk/lect.pl
$(PUSH)
# Scramble
Sources += $(wildcard *.pl)
midterm1.%.mc: midterm1.mc scramble.pl
$(PUSHSTAR)
midterm2.%.mc: midterm2.mc scramble.pl
$(PUSHSTAR)
final.%.test: final.mc scramble.pl
$(PUSHSTAR)
final.test: final.mc
$(copy)
######################################################################
# Test key
.PRECIOUS: %.ssv
# midterm1.1.ssv:
Ignore += *.ssv
midterm%.ssv: midterm%.mc key.pl
$(PUSH)
final.%.ssv: final.%.test key.pl
$(PUSH)
# Make a special answer key for scantron processing
# To allow multiple answers, use KEY in the .bank file
# Does not work yet for self-scoring
# midterm1.1.sc.csv:
Ignore += *.sc.csv
%.sc.csv: %.ssv scantron.pl
$(PUSH)
Ignore += *.scantron.csv
midterm1.scantron.csv:
midterm2.scantron.csv:
final.scantron.csv:
# Combine a bunch of scantron keys into a file for the processors
final.scantron.csv midterm1.scantron.csv midterm2.scantron.csv: %.scantron.csv: %.1.sc.csv %.2.sc.csv %.3.sc.csv %.4.sc.csv %.5.sc.csv
$(cat)
######################################################################
# Make a skeleton to track how questions are scrambled
# Will be used later for marking
Ignore += final.skeleton midterm1.skeleton midterm2.skeleton
final.skeleton midterm1.skeleton midterm2.skeleton: %.skeleton: %.mc skeleton.pl
$(PUSH)
# Make files showing the order for versions of a test
midterm1.%.order: midterm1.skeleton scramble.pl
$(PUSHSTAR)
midterm2.%.order: midterm2.skeleton scramble.pl
$(PUSHSTAR)
final.%.order: final.skeleton scramble.pl
$(PUSHSTAR)
.PRECIOUS: %.orders
Ignore += *.orders
%.orders: %.1.order %.2.order %.3.order %.4.order %.5.order orders.pl
$(PUSH)
midterm1.orders:
######################################################################
## Short answers
# Make combined SA lists for each test
Ignore += *.short.test
Sources += sahead.short
midterm1.short.test: sahead.short material/linear.short material/nonlinear.short
$(cat)
midterm2.short.test: material/linear.short material/nonlinear.short material/structure.short material/life_history.short
$(cat)
# Select the short-answer part of a test
.PRECIOUS: %.sa
Ignore += *.sa
%.sa: %.short.test null.tmp %.select.fmt $(ms)/newtalk/lect.pl
$(PUSH)
######################################################################
## SA processing
## Not scrambling (afraid of format problems)
## Maybe these can be solved by always having a page per question
## Not sure where the scramble markers are going!
Ignore += *.vsa
midterm1.%.vsa: midterm1.sa testselect.pl
$(PUSHSTAR)
midterm2.%.vsa: midterm2.sa testselect.pl
$(PUSHSTAR)
midterm2.vsa: midterm2.sa
$(cat)
## Convert versioned sa to rmd style
Ignore += *.rsa
%.rsa: %.vsa lect/knit.fmt $(ms)/newtalk/lect.pl
$(PUSH)
Ignore += *.ksa
## and finally knit
knit = echo 'knitr::knit("$<", "$@")' | R --vanilla
%.ksa: %.rsa
$(knit)
######################################################################
## Put the test together
### Separator for MC and SA on the same test
Sources += end.dmu
Ignore += *.test
%.test: %.mc end.dmu %.ksa
$(cat)
## Instructions added for 1M strictness; not sure whether to copy them over
Sources += sa_inst.tex
## This should be done better
Sources += copy.tex
######################################################################
.SECONDEXPANSION:
material.now: %.now: $$(wildcard $$*/*)
@echo $^
midterm2.test.pdf: material/structure.bank
midterm2.5.test.pdf: material/life_history.bank
midterm2.3.key.pdf: material/life_history.bank
midterm2.4.rub.pdf: material/structure.short
## Latex outputs
Sources += test.tmp
Ignore += *.test.tex *.test.pdf
%.test.tex: %.test test.tmp test.test.fmt talk/lect.pl
$(PUSH)
Ignore += *.key.*
%.key.tex: %.test test.tmp key.test.fmt talk/lect.pl
$(PUSH)
## Why are rubric dependencies different??
Ignore += *.rub.*
%.rub.tex: %.ksa test.tmp rub.test.fmt talk/lect.pl
$(PUSH)
######################################################################
###### Marking ######
### Moved to Grading 2019
### Deleted apparently outdated stuff 2019 Apr 23 (Tue)
######################################################################
## Grade sheet scripts ##
## I guess this would be good to have somewhere else, for simplicity
## Principled approach to NAs: add text NA for an MSAF
## Use a perl script to replace blanks with zeroes
## Not clear why I'm keeping different tsvs in pulldir, but it's not hurting much.
## Drops are people marked as not matching by the Avenue import
## Working on obsoleting this in Grading
Ignore += marks.tsv
marks.tsv: pulldir/marks3.tsv zero.pl
$(PUSH)
TAmarks.Rout: marks.tsv pulldir/drops.csv TAmarks.R
TAmarks.Rout.csv: TAmarks.R
## Not clear if Avenue interprets "-" correctly (or else sets to 0)
Sources += na_fake.pl
Ignore += TAmarks.avenue.csv
TAmarks.avenue.csv: TAmarks.Rout.csv na_fake.pl
$(PUSH)
######################################################################
## Question analysis
## Need to unscramble and other nonsense; there is still stuff in content
######################################################################
pushdir = ../web/materials
######################################################################
midterm2.1.exam.pdf:
## Print versions and printing
## Cover pages handled differently
## This is because the final cover needs to know the number of pages
## so it's part of the main tex document
## (midterms share midterm.front.tex)
Sources += $(wildcard *.front.tex)
Sources += scantron.jpg
## Add cover pages and such
Ignore += *.exam.tex *.exam.pdf *.front.pdf
midterm1.%.exam.pdf: midterm.front.pdf midterm1.%.test.pdf
$(pdfcat)
midterm2.%.exam.pdf: midterm.front.pdf midterm2.%.test.pdf
$(pdfcat)
### we handle testver twice (redundant code)
### examno.pl does something for the cover page on the final
### midterms (and final body?) are handled by scramble.pl
### Better way might be separate .tmp for the tests, just like
### we have versioned .tmp for the exam
Sources += final.tmp examno.pl final.cover.tex
## final.3.final.pdf: final.tmp
final.%.tmp: final.tmp examno.pl
$(PUSHSTAR)
%.final.tex: %.test %.tmp test.test.fmt talk/lect.pl
$(PUSH)
## http://printpal.mcmaster.ca/
## account # 206000301032330000
## White, orchid, green, salmon
## Two-sided, stapled
midterm1.5.exam.pdf:
## midterm1.3.key.pdf: material/linear.short material/nonlinear.short
midterm1_ship: midterm1.1.exam.pdf midterm1.2.exam.pdf midterm1.3.exam.pdf midterm1.4.exam.pdf midterm1.5.exam.pdf
/bin/cp -f $^ ~/Downloads
## Push tests and keys with the same command
midterm1_post: midterm1.1.test.pdf.pd midterm1.2.test.pdf.pd midterm1.3.test.pdf.pd midterm1.4.test.pdf.pd midterm1.5.test.pdf.pd
midterm1_post: midterm1.1.key.pdf.pd midterm1.2.key.pdf.pd midterm1.3.key.pdf.pd midterm1.4.key.pdf.pd midterm1.5.key.pdf.pd
midterm1.rub.zip: midterm1.1.rub.pdf midterm1.2.rub.pdf midterm1.3.rub.pdf midterm1.4.rub.pdf midterm1.5.rub.pdf
$(ZIP)
midterm2_ship: midterm2.1.exam.pdf midterm2.2.exam.pdf midterm2.3.exam.pdf midterm2.4.exam.pdf midterm2.5.exam.pdf
/bin/cp -f $^ ~/Downloads
midterm2_post: midterm2.1.test.pdf.pd midterm2.2.test.pdf.pd midterm2.3.test.pdf.pd midterm2.4.test.pdf.pd midterm2.5.test.pdf.pd
midterm2_keys: midterm2.1.key.pdf.pd midterm2.2.key.pdf.pd midterm2.3.key.pdf.pd midterm2.4.key.pdf.pd midterm2.5.key.pdf.pd
midterm2.rub.zip: midterm2.1.rub.pdf midterm2.2.rub.pdf midterm2.3.rub.pdf midterm2.4.rub.pdf midterm2.5.rub.pdf
$(ZIP)
## Search email for Exam Upload Instructions (or notice when email arrives and do something)
# http://macdrive.mcmaster.ca/u/d/4ce0683ccb1f49cca555/ (2019 deferred)
# B5%m3dG6
Ignore += $(wildcard Bio_3SS3*.pdf)
Ignore += $(wildcard final*final.pdf)
final_ship: final.1.final.pdf final.2.final.pdf final.2.final.pdf final.4.final.pdf ;
final_upload: final_ship Bio_3SS3_C01_V1.pdf Bio_3SS3_C01_V2.pdf Bio_3SS3_C01_V3.pdf Bio_3SS3_C01_V4.pdf
/bin/cp Bio_3SS3_C01*.pdf ~/Downloads
defer: Bio_3SS3_C01_V5.pdf
/bin/cp $< ~/Downloads
## Finalizing
## final.1.final.pdf:
Bio_3SS3_C01_V%.pdf: final.%.final.pdf
$(forcelink)
## 2018 Shipping Screenshot
## downcall pulldir/ship.png ##
## "Forgot" to re-screenshot (uploaded extra files)
######################################################################
Ignore += $(resting)
-include $(ms)/texdeps.mk
-include $(ms)/git.mk
-include $(ms)/visual.mk
-include $(ms)/wrapR.mk