From 1c3ce5c394293d50b72794ed377bfbe5c6ea6cd7 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 26 Sep 2024 00:38:04 +0200 Subject: administrative-codes: Also generate .json.gz. And pass --no-copy-stat/--no-name and --stdout. --- administrative-codes/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'administrative-codes/Makefile') 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) -- cgit v1.2.3