forked from topojson/topojson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 906 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
GENERATED_FILES = \
component.json \
package.json \
examples/us-10m.json \
examples/world-50m.json \
examples/world-110m.json \
node_modules/us-atlas/topo/us-10m.json \
node_modules/world-atlas/topo/world-50m.json \
node_modules/world-atlas/topo/world-110m.json
.SECONDARY:
.PHONY: all clean test
all: $(GENERATED_FILES)
component.json: src/component.js topojson.js
@rm -f $@
node src/component.js > $@
@chmod a-w $@
package.json: src/package.js topojson.js
@rm -f $@
node src/package.js > $@
@chmod a-w $@
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)