forked from square/crossfilter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (39 loc) · 847 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
JS_TESTER = ./node_modules/vows/bin/vows
JS_COMPILER = ./node_modules/uglify-js/bin/uglifyjs
.PHONY: test benchmark
all: crossfilter.min.js package.json
crossfilter.js: \
src/version.js \
src/identity.js \
src/permute.js \
src/bisect.js \
src/heap.js \
src/heapselect.js \
src/insertionsort.js \
src/quicksort.js \
src/array.js \
src/filter.js \
src/null.js \
src/zero.js \
src/reduce.js \
src/crossfilter.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: crossfilter.js src/package.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
clean:
rm -f crossfilter.js crossfilter.min.js package.json
test: all
@$(JS_TESTER)
benchmark: all
@node test/benchmark.js