This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Use glibc version information in zic and zdump
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Sat, 10 Nov 2012 00:24:32 +0000
- Subject: Use glibc version information in zic and zdump
This patch arranges for the version.h used by zic and zdump to be
generated with glibc's version information, rather than checked in
with the tzcode version information, since we concluded that we want
to use glibc's version in these programs.
With this patch, the --version output from these programs will be of
the form "(GNU libc) 2.16.90" where previously it was of the form
"tz2012i"; I've submitted a patch for upstream tzcode to include the
program name in the --version output as per the GNU Coding Standards
for --version.
Tested x86_64.
2012-11-09 Joseph Myers <joseph@codesourcery.com>
* timezone/version.h: Remove file.
* timezone/README: Do not refer to version.h.
* timezone/Makefile ($(objpfx)zic.o): New dependency on
$(objpfx)version.h.
($(objpfx)zdump.o): Likewise.
($(objpfx/version.h): New target.
diff --git a/timezone/Makefile b/timezone/Makefile
index 49d3b9d..87b03e2 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -54,6 +54,13 @@ include ../Rules
$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
+$(objpfx)zic.o $(objpfx)zdump.o: $(objpfx)version.h
+
+$(objpfx)version.h: $(common-objpfx)config.make
+ echo 'static char const TZVERSION[]="$(PKGVERSION)$(version)";' \
+ > $@.new
+ mv -f $@.new $@
+
tz-cflags = -DTZDIR='"$(zonedir)"' \
-DTZDEFAULT='"$(localtime-file)"' \
-DTZDEFRULES='"$(posixrules-file)"' \
diff --git a/timezone/README b/timezone/README
index da3f20d..7a5e31c 100644
--- a/timezone/README
+++ b/timezone/README
@@ -1,9 +1,7 @@
The files
zic.c zdump.c ialloc.c scheck.c tzfile.h
private.h tzselect.ksh checktab.awk
-come from the tzcode package by Arthur David Olson et.al.; the file
- version.h
-has the contents that would be generated by that package's Makefile.
+come from the tzcode package by Arthur David Olson et.al.
The files
africa antarctica asia australasia europe
diff --git a/timezone/version.h b/timezone/version.h
deleted file mode 100644
index 0873ea1..0000000
--- a/timezone/version.h
+++ /dev/null
@@ -1 +0,0 @@
-static char const TZVERSION[]="tz2012i";
--
Joseph S. Myers
joseph@codesourcery.com