1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-20 12:12:22 +00:00

Add -t ZONETABTYPE option to 'tzselect'.

This is a backwards-compatible way of transitioning to a less
politically-charged approach to choosing TZ values.  A new time
zone table time.tab acts like zone.tab, except it omits TZ values
that are present only for political reasons.  tzselect has a new
"-t zonetabtype" option that lets users select which time zone table
to use, and installers can select the default table.  The zone.tab
file does not change, and the default tzselect table for now is
zone.tab.  This avoids the backward-compatibility concerns
expressed on the tz mailing list; see, for example,
the discussion surrounding Derick Rethans's comments in
<http://mm.icann.org/pipermail/tz/2013-August/019544.html>
* .gitignore: Add time.tab.
* Makefile (ZONETABTYPE): New macro.
(TABDATA): Add time.tab.
(all): Depend on $(TABDATA).
(install): Do not depend on $(TABDATA), since $(DATA) includes it.
Install time.tab too.
(time.tab): New rule.
(tzselect.tab): Substitute ZONETABTYPE.
* zone-time.awk: New file.
* tzselect.8: Document new options, and --help and --version while
we're at it.
* tzselect.ksh (ZONETABTYPE): New var.
Implement -t ZONETABTYPE option.
Check that no extra operands are given.
* zone.tab: Change first comment line, to distinguish the two
tables better.
This commit is contained in:
Paul Eggert
2013-08-16 12:19:42 -07:00
parent d58b59dd8a
commit cc3f93886b
6 changed files with 148 additions and 20 deletions

View File

@ -40,6 +40,15 @@ LOCALTIME= GMT
POSIXRULES= America/New_York
# Default time zone table type for 'tzselect'. See tzselect.8 for details.
# Possible values are:
# 'time' - for a smaller time zone table
# 'zone' - for a backward compatible time zone table; it contains
# alternative TZ values present for compatibility with older versions of
# this software.
ZONETABTYPE= zone
# Also see TZDEFRULESTRING below, which takes effect only
# if the time zone files cannot be accessed.
@ -317,7 +326,7 @@ YDATA= $(PRIMARY_YDATA) pacificnew etcetera backward
NDATA= systemv factory
SDATA= solar87 solar88 solar89
TDATA= $(YDATA) $(NDATA) $(SDATA)
TABDATA= iso3166.tab zone.tab
TABDATA= iso3166.tab time.tab zone.tab
DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) \
leap-seconds.list yearistype.sh
WEB_PAGES= tz-art.htm tz-link.htm
@ -331,15 +340,15 @@ ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC)
SHELL= /bin/sh
all: tzselect zic zdump $(LIBOBJS)
all: tzselect zic zdump $(LIBOBJS) $(TABDATA)
ALL: all date
install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA)
install: all $(DATA) $(REDO) $(TZLIB) $(MANS)
$(ZIC) -y $(YEARISTYPE) \
-d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
-rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab
cp iso3166.tab zone.tab $(TZDIR)/.
-rm -f $(TZDIR)/iso3166.tab $(TZDIR)/time.tab $(TZDIR)/zone.tab
cp iso3166.tab time.tab zone.tab $(TZDIR)/.
-mkdir $(TOPDIR) $(ETCDIR)
cp tzselect zic zdump $(ETCDIR)/.
-mkdir $(TOPDIR) $(MANDIR) \
@ -411,6 +420,9 @@ posix_right: posix_only leapseconds
zones: $(REDO)
time.tab: $(YDATA) zone.tab zone-time.awk
$(AWK) -f zone-time.awk $(YDATA) >$@
$(TZLIB): $(LIBOBJS)
-mkdir $(TOPDIR) $(LIBDIR)
ar ru $@ $(LIBOBJS)
@ -428,6 +440,7 @@ tzselect: tzselect.ksh
-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
-e 's|^\(ZONETABTYPE\)=.*|\1=$(ZONETABTYPE)|' \
<$? >$@
chmod +x $@