Debian Codegraph @

shapefile/Makefile

raw
1 # ogr2ogr doesn’t support logical (L) or date (D) properties (apparently),
2 # so boolean-property and date-property were made by hand in a hex editor.
3
4 TESTS = \
5 empty \
6 mixed-properties \
7 multipoints \
8 null \
9 number-property \
10 points \
11 polygons \
12 polylines \
13 string-property \
14 latin1-property \
15 utf8-property
16
17 TEST_FILES = \
18 $(addprefix test/,$(addsuffix .shp,$(TESTS))) \
19 $(addprefix test/,$(addsuffix .dbf,$(TESTS)))
20
21 all: node_modules $(TEST_FILES)
22
23 clean:
24 rm -f $(TEST_FILES)
25
26 node_modules:
27 npm install
28
29 test/%.shp test/%.dbf: test/%.json
30 rm -f $@ && ogr2ogr -f 'ESRI Shapefile' $@ $<
31
32 test/utf8-property.shp test/utf8-property.dbf: test/utf8-property.json
33 rm -f $@ && ogr2ogr -lco ENCODING=UTF-8 -f 'ESRI Shapefile' $@ $<
34
35 test/latin1-property.shp test/latin1-property.dbf: test/latin1-property.json
36 rm -f $@ && ogr2ogr -f 'ESRI Shapefile' $@ $<
37
38 test: all
39 node_modules/.bin/vows
40 @echo