forked from square/cubism
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (37 loc) · 788 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
JS_TESTER = ./node_modules/vows/bin/vows
JS_COMPILER = ./node_modules/uglify-js/bin/uglifyjs
.PHONY: test
all: cubism.v1.min.js package.json
cubism.v1.js: \
src/cubism.js \
src/id.js \
src/identity.js \
src/option.js \
src/context.js \
src/cube.js \
src/graphite.js \
src/metric.js \
src/metric-constant.js \
src/metric-operator.js \
src/horizon.js \
src/comparison.js \
src/axis.js \
src/rule.js \
Makefile
%.min.js: %.js Makefile
@rm -f $@
$(JS_COMPILER) < $< > $@
%.js:
@rm -f $@
@echo '(function(exports){' > $@
cat $(filter %.js,$^) >> $@
@echo '})(this);' >> $@
@chmod a-w $@
package.json: cubism.v1.js src/package.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
clean:
rm -f cubism.v1.js cubism.v1.min.js package.json
test: all
@$(JS_TESTER)