From 33232258ada8219368e472945d7419dd219c517f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 25 Jul 2012 07:46:06 -0700 Subject: [PATCH] Use a single version number for both code and data. * Makefile (VERSION): New macro, superseding ... (TZCODE_VERSION, TZDATA_VERSION): Remove. All uses changed. (version.h): Call the variable TZVERSION, not TZCODE_VERSION. All uses changed. (tzselect): Interpolate TZVERSION, not TZCODE_VERSION. (public): Adjust to new versioning scheme. * tzselect.ksh (TZVERSION): Rename from TZCODE_VERSION. * zdump.c, zic.c (main): Use TZVERSION, not TZCODE_VERSION. --- Makefile | 11 +++++------ tzselect.ksh | 4 ++-- zdump.c | 2 +- zic.c | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 270fbaa..510d77f 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,7 @@ # 2009-05-17 by Arthur David Olson. # Version numbers of the code and data distributions. -TZCODE_VERSION = tzcode2012c -TZDATA_VERSION = tzdata2012d +VERSION = 2012d # Change the line below for your time zone (after finding the zone you want in # the time zone files, or adding it to a time zone file). @@ -327,7 +326,7 @@ INSTALL: ALL install date.1 version.h: echo >$@ \ - 'static char const TZCODE_VERSION[]="$(TZCODE_VERSION)";' + 'static char const TZVERSION[]="tz$(VERSION)";' zdump: $(TZDOBJS) $(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@ @@ -379,7 +378,7 @@ tzselect: tzselect.ksh sed \ -e 's|AWK=[^}]*|AWK=$(AWK)|g' \ -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \ - -e 's|\(TZCODE_VERSION\)=.*|\1=$(TZCODE_VERSION)|' \ + -e 's|\(TZVERSION\)=.*|\1=tz$(VERSION)|' \ <$? >$@ chmod +x $@ @@ -437,10 +436,10 @@ public: $(ENCHILADA) set-timestamps $(AWK) -f checktab.awk $(PRIMARY_YDATA) LC_ALL=C && export LC_ALL && \ tar $(TARFLAGS) -cf - $(DOCS) $(SOURCES) $(MISC) *.[1-8].txt | \ - gzip $(GZIPFLAGS) > $(TZCODE_VERSION).tar.gz + gzip $(GZIPFLAGS) > tzcode$(VERSION).tar.gz LC_ALL=C && export LC_ALL && \ tar $(TARFLAGS) -cf - $(DATA) | \ - gzip $(GZIPFLAGS) > $(TZDATA_VERSION).tar.gz + gzip $(GZIPFLAGS) > tzdata$(VERSION).tar.gz typecheck: make clean diff --git a/tzselect.ksh b/tzselect.ksh index 3ebaaa7..9e8ceea 100644 --- a/tzselect.ksh +++ b/tzselect.ksh @@ -1,6 +1,6 @@ #! /bin/ksh -TZCODE_VERSION=see_Makefile +TZVERSION=see_Makefile # Ask the user about the time zone, and output the resulting TZ value to stdout. # Interact with the user via stderr and stdin. @@ -55,7 +55,7 @@ EOF exit 0 elif [ "$1" = "--version" ]; then cat <