
Worked around 2015 Uraguay problem by allowing database to be generated for 2016 instead (with "make DATE=2016-01-01").
17 lines
511 B
Makefile
17 lines
511 B
Makefile
TZDIR=tzdata
|
|
TZ_FILES=$(addprefix $(TZDIR)/, africa antarctica asia australasia backward etcetera europe northamerica southamerica)
|
|
|
|
tzout: DATE := $(shell date +%F)
|
|
tzout: $(TZ_FILES)
|
|
TZ_VERSION=`perl -n -e 'm/^VERSION\s*=\s*(\S+)/ and print $$1;' $(TZDIR)/Makefile`; \
|
|
./tz-erl --version $$TZ_VERSION --date $(DATE) -o $@ $^
|
|
|
|
$(TZ_FILES): $(TZDIR)
|
|
|
|
$(TZDIR): tzdata-latest.tar.gz
|
|
mkdir $(TZDIR) && cd $(TZDIR) && tar xzf ../$<
|
|
|
|
tzdata-latest.tar.gz:
|
|
curl -O "ftp://ftp.iana.org/tz/tzdata-latest.tar.gz"
|
|
|
|
|