forked from OpenDSA/OpenDSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
172 lines (130 loc) · 4.68 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
RM = rm -rf
CONFIG_SCRIPT = tools/configure.py
TARGET = build
CSSLINTFLAGS = --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
MINIMIZE = java -jar tools/yuicompressor-2.4.7.jar --nomunge
.PHONY: all clean lint csslint jshint min CS2114 CS223 CS5114 CS3114 CS3114notes CS150 OpenDSA test IS allBooks nomin pull
all: lint
clean:
- $(RM) *~
- $(RM) Books
@# Remove minified JS and CSS files
- $(RM) lib/*-min.*
- $(RM) Doc/*~
- $(RM) Scripts/*~
- $(RM) config/*~
lint: csslint jshint
csslint:
@echo 'running csslint'
@csslint $(CSSLINTFLAGS) AV/Sorting/*.css
@csslint $(CSSLINTFLAGS) AV/Hashing/*.css
@csslint $(CSSLINTFLAGS) AV/List/*.css
@csslint $(CSSLINTFLAGS) AV/*.css
@csslint $(CSSLINTFLAGS) Doc/*.css
@csslint $(CSSLINTFLAGS) lib/*.css
jshint:
@echo 'running jshint'
-@jshint AV/Sorting/*.js
-@jshint AV/Hashing/*.js
-@jshint AV/List/*.js
-@jshint Exercises/Hashing/*.js
-@jshint lib/odsaUtils.js
-@jshint lib/odsaAV.js
-@jshint lib/odsaMOD.js
-@jshint lib/gradebook.js
-@jshint lib/registerbook.js
min: nomin
#lib/odsaUtils-min.js lib/site-min.css lib/odsaAV-min.js lib/odsaAV-min.css lib/khan-exercise-min.js lib/odsaMOD-min.js lib/odsaMOD-min.css lib/gradebook-min.js lib/gradebook-min.css lib/registerbook-min.js
RecurTutor: min
python $(CONFIG_SCRIPT) config/RecurTutor.json
CS2114: min
python $(CONFIG_SCRIPT) config/CS2114.json
CS223: min
python $(CONFIG_SCRIPT) config/CS223.json
CS3114: min
python $(CONFIG_SCRIPT) config/CS3114.json
CS5114: min
python $(CONFIG_SCRIPT) config/CS5114.json
CSCI102: min
python $(CONFIG_SCRIPT) config/CSCI102.json
CSCI204: min
python $(CONFIG_SCRIPT) config/CSCI204.json
CS3114AM: min
python $(CONFIG_SCRIPT) config/CS3114AM.json
CS3114PM: min
python $(CONFIG_SCRIPT) config/CS3114PM.json
CS3114notes: min
python $(CONFIG_SCRIPT) s config/CS3114notes.json
CS150: min
python $(CONFIG_SCRIPT) config/CS150.json
OpenDSA: min
python $(CONFIG_SCRIPT) config/OpenDSA.json
IS: min
python $(CONFIG_SCRIPT) config/IS.json
test: min
python $(CONFIG_SCRIPT) config/test.json
testfi: min
python $(CONFIG_SCRIPT) config/testfi.json
testcpp: min
python $(CONFIG_SCRIPT) config/testcpp.json
uwosh: min
python $(CONFIG_SCRIPT) config/uwosh.json
List: min
python $(CONFIG_SCRIPT) s config/List.json
Dev: min
python $(CONFIG_SCRIPT) config/Dev.json
Everything: min
python $(CONFIG_SCRIPT) config/Everything.json
invalid: min
python $(CONFIG_SCRIPT) config/invalid.json
slides: min
python $(CONFIG_SCRIPT) -s config/slides.json
allBooks: CS150 CS3114 CSCI204 CSCI102 CS5114 CS2114 OpenDSA Everything test slides uwosh
nomin:
@cp JSAV/build/JSAV.js JSAV/build/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/gradebook.js lib/gradebook-min.js
@cp ODSAkhan-exercises/khan-exercise.js lib/khan-exercise-min.js
@cp lib/registerbook.js lib/registerbook-min.js
@cp lib/site.css lib/site-min.css
@cp lib/odsaAV.css lib/odsaAV-min.css
@cp lib/odsaMOD.css lib/odsaMOD-min.css
@cp lib/gradebook.css lib/gradebook-min.css
pull:
git pull
git submodule update
make -s -C JSAV
make -s min
cd Doc; make
lib/odsaUtils-min.js: lib/odsaUtils.js
@echo 'Minimizing lib/odsaUtils.js'
@$(MINIMIZE) lib/odsaUtils.js -o lib/odsaUtils-min.js
lib/site-min.css: lib/site.css
@echo 'Minimizing lib/site.css'
-@$(MINIMIZE) lib/site.css -o lib/site-min.css
lib/odsaAV-min.js: lib/odsaAV.js
@echo 'Minimizing lib/odsaAV.js'
@$(MINIMIZE) lib/odsaAV.js -o lib/odsaAV-min.js
lib/odsaAV-min.css: lib/odsaAV.css
@echo 'Minimizing lib/odsaAV.css'
@$(MINIMIZE) lib/odsaAV.css -o lib/odsaAV-min.css
lib/khan-exercise-min.js: ODSAkhan-exercises/khan-exercise.js
@echo 'Minimizing lib/khan-exercise.js'
@$(MINIMIZE) ODSAkhan-exercises/khan-exercise.js -o lib/khan-exercise-min.js
lib/odsaMOD-min.js: lib/odsaMOD.js
@echo 'Minimizing lib/odsaMOD.js'
@$(MINIMIZE) lib/odsaMOD.js -o lib/odsaMOD-min.js
lib/odsaMOD-min.css: lib/odsaMOD.css
@echo 'Minimizing lib/odsaMOD.css'
@$(MINIMIZE) lib/odsaMOD.css -o lib/odsaMOD-min.css
lib/gradebook-min.js: lib/gradebook.js
@echo 'Minimizing lib/gradebook.js'
@$(MINIMIZE) lib/gradebook.js -o lib/gradebook-min.js
lib/gradebook-min.css: lib/gradebook.css
@echo 'Minimizing lib/gradebook.css'
@$(MINIMIZE) lib/gradebook.css -o lib/gradebook-min.css
lib/registerbook-min.js: lib/registerbook.js
@echo 'Minimizing lib/registerbook.js'
@$(MINIMIZE) lib/registerbook.js -o lib/registerbook-min.js