qdate_localtime/db/Makefile
David Hull 73665bea0b tz-erl: Better document problem when a zone begins or ends using DST.
Worked around 2015 Uraguay problem by allowing database to be generated
for 2016 instead (with "make DATE=2016-01-01").
2015-11-21 22:48:36 +00:00

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"