OUT = administrative-codes CSV_SOURCES = counties.csv municipalities.csv GENERATED_FILES = $(addsuffix .json,$(OUT)) \ $(addsuffix .json.br,$(OUT)) \ $(addsuffix .json.gz,$(OUT)) all: $(GENERATED_FILES) update: $(CSV_SOURCES) $(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 --no-copy-stat --verbose --stdout <$< >$@ %.json.gz: %.json gzip --best --keep --no-name --verbose --stdout <$< >$@ clean: rm -f -- $(GENERATED_FILES) .PHONY: all update clean