aboutsummaryrefslogtreecommitdiffstats
path: root/administrative-codes
diff options
context:
space:
mode:
Diffstat (limited to 'administrative-codes')
-rw-r--r--administrative-codes/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/administrative-codes/Makefile b/administrative-codes/Makefile
index c0008bc..9e2464d 100644
--- a/administrative-codes/Makefile
+++ b/administrative-codes/Makefile
@@ -1,8 +1,13 @@
OUT = administrative-codes
CSV_SOURCES = counties.csv municipalities.csv
-GENERATED_FILES = $(addsuffix .json,$(OUT)) $(addsuffix .json.br,$(OUT))
+GENERATED_FILES = $(addsuffix .json,$(OUT)) \
+ $(addsuffix .json.br,$(OUT)) \
+ $(addsuffix .json.gz,$(OUT))
+
all: $(GENERATED_FILES)
+update: $(CSV_SOURCES)
+
$(CSV_SOURCES): %.csv:
./update
@@ -11,9 +16,12 @@ $(CSV_SOURCES): %.csv:
# XXX The brotli(1) executable doesn't support mode=MODE_TEXT
%.json.br: %.json
- brotli --best --keep --output=$@ -- $^
+ brotli --best --keep --no-copy-stat --verbose --stdout <$< >$@
+
+%.json.gz: %.json
+ gzip --best --keep --no-name --verbose --stdout <$< >$@
clean:
rm -f -- $(GENERATED_FILES)
-.PHONY: update clean
+.PHONY: all update clean