aboutsummaryrefslogtreecommitdiffstats
path: root/administrative-codes/Makefile
blob: c0008bcd83187f085be74c3fcbd97fd494f84da3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
OUT = administrative-codes
CSV_SOURCES = counties.csv municipalities.csv
GENERATED_FILES = $(addsuffix .json,$(OUT)) $(addsuffix .json.br,$(OUT))
all: $(GENERATED_FILES)

$(CSV_SOURCES): %.csv:
	./update

%.json: $(CSV_SOURCES)
	./csv2json $^ >$@

# XXX The brotli(1) executable doesn't support mode=MODE_TEXT
%.json.br: %.json
	brotli --best --keep --output=$@ -- $^

clean:
	rm -f -- $(GENERATED_FILES)

.PHONY: update clean