forked from OpenDSA/OpenDSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
360 lines (265 loc) · 9.79 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
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
ifeq ($(OS),Windows_NT)
SHELL=C:/Windows/System32/cmd.exe
endif
RM = rm -rf
CONFIG_SCRIPT = tools/configure.py
TARGET = build
LINT = eslint --no-color
CSSOLDLINTFLAGS = --quiet --errors=empty-rules,import,errors --warnings=duplicate-background-images,compatible-vendor-prefixes,display-property-grouping,fallback-colors,duplicate-properties,shorthand,gradients,font-sizes,floats,overqualified-elements,import,regex-selectors,rules-count,unqualified-attributes,vendor-prefix,zero-units
CSSLINTFLAGS = --quiet --ignore=ids,adjoining-classes
MINIMIZE = uglifyjs
.PHONY: all clean alllint csslint lint lintExe jsonlint min testLTI test TestLMS
all: alllint
allbooks: Everything test CS2 CS3 RecurTutor PL
clean:
- $(RM) *~
- $(RM) Books
@# Remove minified JS and CSS files
- $(RM) lib/*-min.*
- $(RM) Doc/*~
- $(RM) Scripts/*~
- $(RM) config/*~
alllint: csslint lint jsonlint
csslint:
@echo 'running csslint'
@csslint $(CSSLINTFLAGS) AV/Background/*.css
@csslint $(CSSLINTFLAGS) AV/Design/*.css
TODOcsslint:
@csslint $(CSSLINTFLAGS) AV/List/*.css
@csslint $(CSSLINTFLAGS) AV/Sorting/*.css
@csslint $(CSSLINTFLAGS) AV/Hashing/*.css
@csslint $(CSSLINTFLAGS) AV/Searching/*.css
#@csslint $(CSSLINTFLAGS) AV/*.css
@csslint $(CSSLINTFLAGS) Doc/*.css
@csslint $(CSSLINTFLAGS) lib/*.css
lint: lintExe
@echo 'running eslint'
-@$(LINT) AV/Background/*.js
-@$(LINT) AV/Design/*.js
TODOlintAV:
@echo 'linting AVs'
-@$(LINT) AV/Binary/*.js
-@$(LINT) AV/General/*.js
-@$(LINT) AV/List/*.js
-@$(LINT) AV/Sorting/*.js
-@$(LINT) AV/Hashing/*.js
-@$(LINT) AV/Searching/*.js
-@$(LINT) AV/Sorting/*.js
lintExe:
@echo 'linting KA Exercises'
-@$(LINT) Exercises/AlgAnal/*.js
-@$(LINT) Exercises/Background/*.js
-@$(LINT) Exercises/Binary/*.js
-@$(LINT) Exercises/Design/*.js
-@$(LINT) Exercises/General/*.js
-@$(LINT) Exercises/Graph/*.js
-@$(LINT) Exercises/Hashing/*.js
-@$(LINT) Exercises/Indexing/*.js
-@$(LINT) Exercises/List/*.js
-@$(LINT) Exercises/RecurTutor/*.js
-@$(LINT) Exercises/RecurTutor2/*.js
-@$(LINT) Exercises/Sorting/*.js
TODO$(LINT)lib:
@echo 'linting libraries'
-@$(LINT) lib/odsaUtils.js
-@$(LINT) lib/odsaAV.js
-@$(LINT) lib/odsaMOD.js
-@$(LINT) lib/gradebook.js
-@$(LINT) lib/registerbook.js
-@$(LINT) lib/createcourse.js
-@$(LINT) lib/conceptMap.js
jsonlint:
@jsonlint -q AV/Background/*.json
@jsonlint -q AV/Design/*.json
@jsonlint -q config/*.json
@jsonlint -q config/Old/*.json
min: nomin
#lib/odsaUtils-min.js lib/site-min.css lib/odsaAV-min.js lib/odsaAV-min.css lib/odsaMOD-min.js lib/odsaMOD-min.css lib/gradebook-min.js lib/gradebook-min.css lib/registerbook-min.js
PittACOS: min
python $(CONFIG_SCRIPT) config/PittACOS.json --no-lms
OpenFLAP: min
python $(CONFIG_SCRIPT) config/OpenFLAP.json --no-lms
Obsolete: min
python $(CONFIG_SCRIPT) config/Obsolete.json --no-lms
Test: min
python $(CONFIG_SCRIPT) config/Test.json --no-lms
DanaG: min
python $(CONFIG_SCRIPT) config/DanaG.json --no-lms
TJeffrey: min
python $(CONFIG_SCRIPT) config/TJeffrey.json --no-lms
Michael: min
python $(CONFIG_SCRIPT) config/Michael.json --no-lms
Raghu: min
python $(CONFIG_SCRIPT) config/Raghu.json --no-lms
Weihao: min
python $(CONFIG_SCRIPT) config/Weihao.json --no-lms
SimpleDemo: min
python $(CONFIG_SCRIPT) config/SimpleDemo.json --no-lms
CT: min
python $(CONFIG_SCRIPT) config/CT.json --no-lms
CTEX: min
python $(CONFIG_SCRIPT) config/CTEX.json --no-lms
Sam: min
python $(CONFIG_SCRIPT) config/Sam.json --no-lms
Yinwen: min
python $(CONFIG_SCRIPT) config/Yinwen.json --no-lms
NP: min
python $(CONFIG_SCRIPT) config/NP.json --no-lms
JFLAP: min
python $(CONFIG_SCRIPT) config/JFLAP.json --no-lms
FormalLang: min
python $(CONFIG_SCRIPT) config/FormalLang.json --no-lms
VisFormalLang: min
python $(CONFIG_SCRIPT) config/VisFormalLang.json --no-lms
FL2019: min
python $(CONFIG_SCRIPT) config/FormalLanguages2019.json --no-lms
PIExample: min
python $(CONFIG_SCRIPT) config/PIExample.json --no-lms
DeformsTesting: min
python $(CONFIG_SCRIPT) config/DeformsTesting.json --no-lms
OpenPOPExercises: min
python $(CONFIG_SCRIPT) config/OpenPOPExercises.json --no-lms
FLslides: min
python $(CONFIG_SCRIPT) -s config/FLslides.json --no-lms
CS4114: min
python $(CONFIG_SCRIPT) config/CS4114.json --no-lms
CS4114slides: min
python $(CONFIG_SCRIPT) -s config/CS4114slides.json --no-lms
Spatial: min
python $(CONFIG_SCRIPT) config/Spatial.json --no-lms
PointersJavaSummer: min
python $(CONFIG_SCRIPT) config/PointersJavaSummer.json --no-lms
PointersJava: min
python $(CONFIG_SCRIPT) config/PointersJava.json --no-lms
PointersCPP: min
python $(CONFIG_SCRIPT) config/PointersCPP.json --no-lms
PL: min
python $(CONFIG_SCRIPT) config/PL.json --no-lms
Graphics: min
python $(CONFIG_SCRIPT) config/Graphics.json --no-lms
PLdev: min
python $(CONFIG_SCRIPT) config/PLdev.json --no-lms
Everything: min
python $(CONFIG_SCRIPT) config/Everything.json --no-lms
CS3notes: min
python $(CONFIG_SCRIPT) config/CS3slides.json -b CS3notes --no-lms
CS3slides: min
python $(CONFIG_SCRIPT) -s config/CS3slides.json --no-lms
CS3114slides: min
python $(CONFIG_SCRIPT) -s config/CS3114slides.json --no-lms
CS3F18slides: min
python $(CONFIG_SCRIPT) -s config/CS3F18slides.json --no-lms
CS3F18notes: min
python $(CONFIG_SCRIPT) config/CS3F18slides.json --no-lms -b CS3F18notes --no-lms
CS4104: min
python $(CONFIG_SCRIPT) config/CS4104.json --no-lms
CS2: min
python $(CONFIG_SCRIPT) config/CS2.json --no-lms
CS2114: min
python $(CONFIG_SCRIPT) config/CS2114.json --no-lms
CS5040: min
python $(CONFIG_SCRIPT) config/CS5040.json --no-lms
CS5040notes: min
python $(CONFIG_SCRIPT) config/CS5040slides.json -b CS5040notes --no-lms
CS5040slides: min
python $(CONFIG_SCRIPT) -s config/CS5040slides.json --no-lms
CS5040MasterN: min
python $(CONFIG_SCRIPT) config/CS5040Master.json -b CS5040MasterN --no-lms
CS5040Master: min
python $(CONFIG_SCRIPT) -s config/CS5040Master.json --no-lms
Codio: min
python $(CONFIG_SCRIPT) config/Codio.json --no-lms
CS3: min
python $(CONFIG_SCRIPT) config/CS3.json --no-lms
CS3C: min
python $(CONFIG_SCRIPT) config/CS3C.json --no-lms
CSCI204: min
python $(CONFIG_SCRIPT) config/CSCI204.json --no-lms
CSCI271: min
python $(CONFIG_SCRIPT) config/CSCI271.json --no-lms
CS415: min
python $(CONFIG_SCRIPT) config/CS415.json --no-lms
CSCD320: min
python $(CONFIG_SCRIPT) config/CSCD320.json --no-lms
CSC215: min
python $(CONFIG_SCRIPT) config/CSC215.json --no-lms
CS240: min
python $(CONFIG_SCRIPT) config/CS240.json --no-lms
CSCI2101: min
python $(CONFIG_SCRIPT) config/CSCI2101.json --no-lms
Yuhui: min
python $(CONFIG_SCRIPT) config/Yuhui.json --no-lms
CS3SS18slides: min
python $(CONFIG_SCRIPT) -s config/CS3SS18slides.json --no-lms
CS3SS18notes: min
python $(CONFIG_SCRIPT) config/CS3SS18slides.json -b CS3SS18notes --no-lms
COMP271: min
python $(CONFIG_SCRIPT) config/COMP271.json --no-lms
COMPSCI186: min
python $(CONFIG_SCRIPT) config/COMPSCI186.json --no-lms
testcmap: min
python $(CONFIG_SCRIPT) config/testcmap.json --no-lms
WuChen: min
python $(CONFIG_SCRIPT) config/WuChen.json --no-lms
Echo: min
python $(CONFIG_SCRIPT) config/Echo.json --no-lms
Ming: min
python $(CONFIG_SCRIPT) config/Ming.json --no-lms
nomin:
@cp lib/JSAV.js lib/JSAV-min.js
@cp lib/odsaUtils.js lib/odsaUtils-min.js
@cp lib/odsaMOD.js lib/odsaMOD-min.js
@cp lib/odsaAV.js lib/odsaAV-min.js
@cp lib/odsaKA.js lib/odsaKA-min.js
@cp lib/gradebook.js lib/gradebook-min.js
@cp lib/registerbook.js lib/registerbook-min.js
@cp lib/site.css lib/site-min.css
@cat lib/normalize.css lib/odsaAV.css > lib/odsaAV-min.css
@cp lib/odsaMOD.css lib/odsaMOD-min.css
@cp lib/odsaStyle.css lib/odsaStyle-min.css
@cp lib/odsaKA.css lib/odsaKA-min.css
@cp lib/gradebook.css lib/gradebook-min.css
rst2json:
python tools/rst2json.py
pull:
git pull
git submodule init
git submodule update
make -s min
make -C Doc
lib/odsaUtils-min.js: lib/odsaUtils.js
@echo 'Minimizing lib/odsaUtils.js'
@$(MINIMIZE) lib/odsaUtils.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaUtils-min.js
lib/site-min.css: lib/site.css
@echo 'Minimizing lib/site.css'
-@$(MINIMIZE) lib/site.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/site-min.css
lib/odsaAV-min.js: lib/odsaAV.js
@echo 'Minimizing lib/odsaAV.js'
@$(MINIMIZE) lib/odsaAV.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaAV-min.js
lib/odsaKA-min.js: lib/odsaKA.js
@echo 'Minimizing lib/odsaKA.js'
@$(MINIMIZE) lib/odsaKA.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaKA-min.js
lib/odsaAV-min.css: lib/odsaAV.css
@echo 'Minimizing lib/odsaAV.css'
@$(MINIMIZE) lib/odsaAV.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaAV-min.css
lib/odsaKA-min.css: lib/odsaKA.css
@echo 'Minimizing lib/odsaKA.css'
@$(MINIMIZE) lib/odsaKA.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaKA-min.css
lib/odsaMOD-min.js: lib/odsaMOD.js
@echo 'Minimizing lib/odsaMOD.js'
@$(MINIMIZE) lib/odsaMOD.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaMOD-min.js
lib/odsaMOD-min.css: lib/odsaMOD.css
@echo 'Minimizing lib/odsaMOD.css'
@$(MINIMIZE) lib/odsaMOD.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/odsaMOD-min.css
lib/gradebook-min.js: lib/gradebook.js
@echo 'Minimizing lib/gradebook.js'
@$(MINIMIZE) lib/gradebook.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/gradebook-min.js
lib/gradebook-min.css: lib/gradebook.css
@echo 'Minimizing lib/gradebook.css'
@$(MINIMIZE) lib/gradebook.css --comments '/^!|@preserve|@license|@cc_on/i' > lib/gradebook-min.css
lib/registerbook-min.js: lib/registerbook.js
@echo 'Minimizing lib/registerbook.js'
@$(MINIMIZE) lib/registerbook.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/registerbook-min.js
lib/createcourse-min.js: lib/createcourse.js
@echo 'Minimizing lib/createcourse.js'
@$(MINIMIZE) lib/createcourse.js --comments '/^!|@preserve|@license|@cc_on/i' > lib/createcourse-min.js