forked from topojson/topojson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 951 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
GENERATED_FILES = \
bower.json \
package.json \
topojson.min.js \
examples/us-10m.json \
examples/world-50m.json \
examples/world-110m.json
INTERMEDIATE_FILES = \
node_modules/us-atlas/topo/us-*.json \
node_modules/world-atlas/topo/world-*.json
.SECONDARY:
.PHONY: all clean test
all: $(GENERATED_FILES)
bower.json: bin/bower topojson.js
@rm -f $@
bin/bower > $@
@chmod a-w $@
package.json: bin/package topojson.js
@rm -f $@
bin/package > $@
@chmod a-w $@
topojson.min.js: topojson.js
node_modules/.bin/uglifyjs $^ -c -m -o $@
examples/us-%.json: node_modules/us-atlas/topo/us-%.json
cp $< $@
examples/world-%.json: node_modules/world-atlas/topo/world-%.json
cp $< $@
node_modules/us-atlas/topo/%.json:
make topo/$(notdir $@) -C node_modules/us-atlas
node_modules/world-atlas/topo/%.json:
make topo/$(notdir $@) -C node_modules/world-atlas
test: all
@npm test
clean:
rm -f -- $(GENERATED_FILES) $(INTERMEDIATE_FILES)