File: Makefile

package info (click to toggle)
python-mpld3 0.3git%2B20140910dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,808 kB
  • ctags: 1,095
  • sloc: python: 3,595; makefile: 187
file content (44 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (2)
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
	@nodejs bin/version $(VERSION) > $@

mpld3/js/mpld3.v$(VERSION).js: $(shell smash --ignore-missing --list src/mpld3.js) package.json
	@rm -f $@
	smash src/mpld3.js | uglifyjs -b --indent 2 -o $@
	@chmod a-w $@

mpld3/js/mpld3.v$(VERSION).min.js: mpld3/js/mpld3.v$(VERSION).js bin/uglify
	@rm -f $@
	uglifyjs $< > $@
	@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