-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (38 loc) · 959 Bytes
/
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
# Shamelessly lifted from d3.
NODE_PATH ?= ./node_modules
JS_COMPILER = $(NODE_PATH)/uglify-js/bin/uglifyjs
JS_BEAUTIFIER = $(NODE_PATH)/uglify-js/bin/uglifyjs -b -i 2 -nm -ns
JS_TESTER = $(NODE_PATH)/vows/bin/vows
LOCALE ?= en_US
all: \
d3dev.v0.js \
d3dev.v0.min.js \
package.json
.INTERMEDIATE d3dev.v0.js: \
src/start.js \
d3dev.core.js \
d3dev.statistics.js \
src/end.js
d3dev.core.js: \
src/core/core.js \
src/core/device.js
d3dev.statistics.js: \
src/statistics/statistics.js \
src/statistics/summary.js \
src/statistics/fit.js \
src/statistics/nclass.js
test: all
@$(JS_TESTER)
%.min.js: %.js Makefile
@rm -f $@
$(JS_COMPILER) < $< > $@
d3dev%.js: Makefile
@rm -f $@
cat $(filter %.js,$^) | $(JS_BEAUTIFIER) > $@
@chmod a-w $@
package.json: src/package.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
clean:
rm -f d3dev*.js package.json