forked from mpld3/mpld3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 943 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
VERSION = $(shell python version.py)
GENERATED_FILES = \
src/version.js \
mpld3/js/mpld3.v$(VERSION).js \
mpld3/js/mpld3.v$(VERSION).min.js
.PHONY: test
javascript: $(GENERATED_FILES)
test:
@npm test
src/version.js: mpld3/__about__.py
@node bin/version $(VERSION) > $@
mpld3/js/mpld3.v$(VERSION).js: $(shell node_modules/.bin/smash --ignore-missing --list src/mpld3.js) package.json
@rm -f $@
node_modules/.bin/smash src/mpld3.js | node_modules/.bin/uglifyjs - -b indent-level=2 -o $@
@chmod a-w $@
mpld3/js/mpld3.v$(VERSION).min.js: mpld3/js/mpld3.v$(VERSION).js bin/uglify
@rm -f $@
bin/uglify $< > $@
@chmod a-w $@
clean:
rm -f -- $(GENERATED_FILES)
sync_current : mplexporter
rsync -r mplexporter/mplexporter mpld3/
submodule : mplexporter
python setup.py submodule
build : javascript submodule
python setup.py build
inplace : build
python setup.py build_ext --inplace
install : build
python setup.py install