diff options
Diffstat (limited to 'administrative-codes/Makefile')
-rw-r--r-- | administrative-codes/Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/administrative-codes/Makefile b/administrative-codes/Makefile new file mode 100644 index 0000000..c0008bc --- /dev/null +++ b/administrative-codes/Makefile @@ -0,0 +1,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 |