aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-09-26 00:38:04 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-09-26 00:38:06 +0200
commit1c3ce5c394293d50b72794ed377bfbe5c6ea6cd7 (patch)
tree083fb2ac696e847b04556575c0fbb2326e2feabc
parent65487ffca47186727733822f0975fa4eeb319ca7 (diff)
administrative-codes: Also generate .json.gz.
And pass --no-copy-stat/--no-name and --stdout.
-rw-r--r--administrative-codes/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/administrative-codes/Makefile b/administrative-codes/Makefile
index e8b8f2b..9e2464d 100644
--- a/administrative-codes/Makefile
+++ b/administrative-codes/Makefile
@@ -1,6 +1,9 @@
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)
@@ -13,7 +16,10 @@ $(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)