[tz] [PROPOSED PATCH] * Makefile (check_sorted): Further improve quality of checks.
Paul Eggert
eggert at cs.ucla.edu
Sun Sep 7 02:25:48 UTC 2014
* NEWS: Document this.
* zone1970.tab: Sort country codes better.
---
Makefile | 13 +++++++++----
NEWS | 4 ++++
zone1970.tab | 2 +-
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 86682ce..7bdd642 100644
--- a/Makefile
+++ b/Makefile
@@ -487,12 +487,17 @@ check_white_space: $(ENCHILADA)
! grep -n '[[:space:]]$$' $(ENCHILADA)
! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA)
-check_sorted: backward backzone iso3166.tab zone1970.tab
- $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -c
- $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -c
- $(AWK) '/^[^#]/ {print}' iso3166.tab | LC_ALL=C sort -c
+CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
+
+check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
+ $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
+ $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
+ $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
+ $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
$(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
LC_ALL=C sort -c
+ $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
+ LC_ALL=C sort -cu
check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
for tab in $(ZONETABLES); do \
diff --git a/NEWS b/NEWS
index 0f3c809..3134648 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,10 @@ Unreleased, experimental changes
An access to uninitalized data has been fixed.
(Thanks to Jörg Richter for reporting the problem.)
+ Changes affecting build procedure
+
+ 'make check' now checks better for properly-sorted data.
+
Changes affecting documentation and commentary
zdump -c's treatment of years is now documented to use the
diff --git a/zone1970.tab b/zone1970.tab
index 03c50d8..f0e38f1 100644
--- a/zone1970.tab
+++ b/zone1970.tab
@@ -323,7 +323,7 @@ TM +3757+05823 Asia/Ashgabat
TN +3648+01011 Africa/Tunis
TO -2110-17510 Pacific/Tongatapu
TR +4101+02858 Europe/Istanbul
-TT,AG,AI,BL,DM,GD,GP,MF,LC,KN,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
+TT,AG,AI,BL,DM,GD,GP,KN,LC,MF,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
TV -0831+17913 Pacific/Funafuti
TW +2503+12130 Asia/Taipei
UA +5026+03031 Europe/Kiev most locations
--
1.9.1
More information about the tz
mailing list