The branch stable/14 has been updated by philip:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7eb0b02bc4eddee6c916ab6a01ec92e0b9dc867e

commit 7eb0b02bc4eddee6c916ab6a01ec92e0b9dc867e
Author:     Philip Paeps <phi...@freebsd.org>
AuthorDate: 2024-09-06 01:37:36 +0000
Commit:     Philip Paeps <phi...@freebsd.org>
CommitDate: 2024-09-09 01:44:03 +0000

    contrib/tzdata: import tzdata 2024b
    
    Changes: https://github.com/eggert/tz/blob/2024b/NEWS
    
    (cherry picked from commit e273650f2c538034b45f78e670a89cbf333ab6db)
---
 contrib/tzdata/CONTRIBUTING      |  18 +-
 contrib/tzdata/Makefile          | 412 +++++++++++-----------
 contrib/tzdata/NEWS              | 124 ++++++-
 contrib/tzdata/africa            |  73 ++--
 contrib/tzdata/antarctica        |  58 ++--
 contrib/tzdata/asia              | 442 ++++++++++++------------
 contrib/tzdata/australasia       | 130 +++----
 contrib/tzdata/backward          |  15 +-
 contrib/tzdata/backzone          |  35 +-
 contrib/tzdata/checknow.awk      |   4 +-
 contrib/tzdata/etcetera          |  54 +--
 contrib/tzdata/europe            | 713 ++++++++++++++++++++++++---------------
 contrib/tzdata/leap-seconds.list |  30 +-
 contrib/tzdata/leapseconds       |   8 +-
 contrib/tzdata/northamerica      | 145 +++++---
 contrib/tzdata/southamerica      | 486 +++++++++++++-------------
 contrib/tzdata/theory.html       | 214 ++++++++----
 contrib/tzdata/version           |   2 +-
 contrib/tzdata/ziguard.awk       |  32 +-
 contrib/tzdata/zone.tab          |   3 +-
 contrib/tzdata/zone1970.tab      |   3 +-
 contrib/tzdata/zonenow.tab       |   8 +-
 22 files changed, 1768 insertions(+), 1241 deletions(-)

diff --git a/contrib/tzdata/CONTRIBUTING b/contrib/tzdata/CONTRIBUTING
index 6d800e4c03a3..f6edbd3be7d3 100644
--- a/contrib/tzdata/CONTRIBUTING
+++ b/contrib/tzdata/CONTRIBUTING
@@ -23,10 +23,10 @@ such as renaming, adding or removing zones, please read
 "Theory and pragmatics of the tz code and data"
 <https://www.iana.org/time-zones/repository/theory.html>.
 It is also good to browse the mailing list archives
-<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
-to work well.  Additions to data should contain commentary citing
-reliable sources as justification.  Citations should use "https:" URLs
-if available.
+<https://lists.iana.org/hyperkitty/list/t...@iana.org/>
+for examples of patches that tend to work well.
+Changes should contain commentary citing reliable sources.
+Citations should use "https:" URLs if available.
 
 For changes that fix sensitive security-related bugs, please see the
 distribution's 'SECURITY' file.
@@ -63,12 +63,16 @@ If you use Git the following workflow may be helpful:
   * Edit source files.  Include commentary that justifies the
     changes by citing reliable sources.
 
-  * Debug the changes, e.g.:
+  * Debug the changes locally, e.g.:
 
-        make check
-        make install
+        make TOPDIR=$PWD/tz clean check install
         ./zdump -v America/Los_Angeles
 
+    Although builds assume only basic POSIX, they use extra features
+    if available.  'make check' accesses validator.w3.org unless you
+    lack 'curl' or use 'make CURL=:'.  If you have the latest GCC,
+    "make CFLAGS='$(GCC_DEBUG_FLAGS)'" does extra checking.
+
   * For each separable change, commit it in the new branch, e.g.:
 
         git add northamerica
diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile
index d48354c72df4..0087b4596515 100644
--- a/contrib/tzdata/Makefile
+++ b/contrib/tzdata/Makefile
@@ -3,17 +3,17 @@
 # 2009-05-17 by Arthur David Olson.
 # Request POSIX conformance; this must be the first non-comment line.
 .POSIX:
-# On older platforms you may need to scrounge for a POSIX-conforming 'make'.
-# For example, on Solaris 10 (2005), use /usr/sfw/bin/gmake or
-# /usr/xpg4/bin/make, not /usr/ccs/bin/make.
+# On older platforms you may need to scrounge for POSIX conformance.
+# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007),
+# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'.
 
 # To affect how this Makefile works, you can run a shell script like this:
 #
 #      #!/bin/sh
-#      make CC='gcc -std=gnu11' "$@"
+#      make CC='gcc -std=gnu23' "$@"
 #
-# This example script is appropriate for a pre-2017 GNU/Linux system
-# where a non-default setting is needed to support this package's use of C99.
+# This example script is appropriate for a circa 2024 GNU/Linux system
+# where a non-default setting enables this package's optional use of C23.
 #
 # Alternatively, you can simply edit this Makefile to tailor the following
 # macro definitions.
@@ -53,7 +53,7 @@ DATAFORM=             main
 
 LOCALTIME=     Factory
 
-# The POSIXRULES macro controls interpretation of POSIX-2017.1-like TZ
+# The POSIXRULES macro controls interpretation of POSIX-like TZ
 # settings like TZ='EET-2EEST' that lack DST transition rules.
 # If POSIXRULES is '-', no template is installed; this is the default.
 # Any other value for POSIXRULES is obsolete and should not be relied on, as:
@@ -132,8 +132,9 @@ LIBDIR = $(TOPDIR)/$(USRDIR)/lib
 
 # Types to try, as an alternative to time_t.
 TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL)
-TIME_T_ALTERNATIVES_HEAD = int_least64_t
-TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t
+TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck
+TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \
+  uint_least64_t.ck
 
 # What kind of TZif data files to generate.  (TZif is the binary time
 # zone data format that zic generates; see Internet RFC 8536.)
@@ -219,6 +220,7 @@ LDLIBS=
 #      than what POSIX specifies, assuming local time is UT.
 #      For example, N is 252460800 on AmigaOS.
 #  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
+#      on POSIX platforms predating POSIX.1-2024
 #  -DHAVE_DECL_ENVIRON if <unistd.h> declares 'environ'
 #  -DHAVE_DECL_TIMEGM=0 if <time.h> does not declare timegm
 #  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
@@ -229,7 +231,7 @@ LDLIBS=
 #      where LDLIBS also needs to contain -lintl on some hosts;
 #      -DHAVE_GETTEXT=0 to avoid using gettext
 #  -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares
-#      ctime_r and asctime_r incompatibly with the POSIX standard
+#      ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier
 #      (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
 #  -DHAVE_INTTYPES_H=0 if <inttypes.h> does not work*+
 #  -DHAVE_LINK=0 if your system lacks a link function
@@ -261,8 +263,11 @@ LDLIBS=
 #  -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers
 #      with external linkage, e.g., applications cannot define 'localtime'.
 #  -Dssize_t=long on hosts like MS-Windows that lack ssize_t
-#  -DSUPPORT_C89 if the tzcode library should support C89 callers+
-#      However, this might trigger latent bugs in C99-or-later callers.
+#  -DSUPPORT_C89=0 if the tzcode library should not support C89 callers
+#      Although -DSUPPORT_C89=0 might work around latent bugs in callers,
+#      it does not conform to POSIX.
+#  -DSUPPORT_POSIX2008 if the library should support older POSIX callers+
+#      However, this might cause problems in POSIX.1-2024-or-later callers.
 #  -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has
 #      security implications and is not recommended for general use
 #  -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
@@ -274,7 +279,7 @@ LDLIBS=
 #  -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
 #      the default is system-supplied, typically "/usr/lib/locale"
 #  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
-#      DST transitions for POSIX.1-2017-style TZ strings lacking them,
+#      DST transitions for proleptic format TZ strings lacking them,
 #      in the usual case where POSIXRULES is '-'.  If not specified,
 #      TZDEFRULESTRING defaults to US rules for future DST transitions.
 #      This mishandles some past timestamps, as US DST rules have changed.
@@ -302,23 +307,25 @@ LDLIBS=
 #
 # * Options marked "*" can be omitted if your compiler is C23 compatible.
 # * Options marked "+" are obsolescent and are planned to be removed
-#   once the code assumes C99 or later, say in the year 2029.
+#   once the code assumes C99 or later (say in the year 2029)
+#   and POSIX.1-2024 or later (say in the year 2034).
 #
 # Select instrumentation via "make GCC_INSTRUMENT='whatever'".
 GCC_INSTRUMENT = \
   -fsanitize=undefined -fsanitize-address-use-after-scope \
   -fsanitize-undefined-trap-on-error -fstack-protector
 # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow.
-GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
+GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \
   $(GCC_INSTRUMENT) \
   -Wall -Wextra \
   -Walloc-size-larger-than=100000 -Warray-bounds=2 \
   -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wdate-time \
   -Wdeclaration-after-statement -Wdouble-promotion \
-  -Wduplicated-branches -Wduplicated-cond \
+  -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \
   -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
   -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \
-  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
+  -Wmissing-declarations -Wmissing-prototypes \
+  -Wmissing-variable-declarations -Wnested-externs \
   -Wnull-dereference \
   -Wold-style-definition -Woverlength-strings -Wpointer-arith \
   -Wshadow -Wshift-overflow=2 -Wstrict-overflow \
@@ -327,10 +334,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
   -Wsuggest-attribute=const -Wsuggest-attribute=format \
   -Wsuggest-attribute=malloc \
   -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
-  -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \
+  -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \
   -Wvariadic-macros -Wvla -Wwrite-strings \
-  -Wno-address -Wno-format-nonliteral -Wno-sign-compare \
-  -Wno-type-limits
+  -Wno-format-nonliteral -Wno-sign-compare
 #
 # If your system has a "GMT offset" field in its "struct tm"s
 # (or if you decide to add such a field in your system's "time.h" file),
@@ -341,9 +347,8 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # Similarly, if your system has a "zone abbreviation" field, define
 #      -DTM_ZONE=tm_zone
 # and define NO_TM_ZONE to suppress any guessing.
-# Although these two fields are not required by POSIX.1-2017,
-# POSIX 202x/D4 requires them and they are widely available
-# on GNU/Linux and BSD systems.
+# Although POSIX.1-2024 requires these fields and they are widely available
+# on GNU/Linux and BSD systems, some older systems lack them.
 #
 # The next batch of options control support for external variables
 # exported by tzcode.  In practice these variables are less useful
@@ -353,7 +358,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # #    -DHAVE_TZNAME=0 # do not support "tzname"
 # #    -DHAVE_TZNAME=1 # support "tzname", which is defined by system library
 # #    -DHAVE_TZNAME=2 # support and define "tzname"
-# # to the "CFLAGS=" line.  "tzname" is required by POSIX.1-1988 and later.
+# # to the "CFLAGS=" line.  Although "tzname" is required by POSIX.1-1988
+# # and later, its contents are unspecified if you use a geographical TZ
+# # and the variable is planned to be removed in a future POSIX edition.
 # # If not defined, the code attempts to guess HAVE_TZNAME from other macros.
 # # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause
 # # crashes when combined with some platforms' standard libraries,
@@ -364,7 +371,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 # #    -DUSG_COMPAT=1 # support, and variables are defined by system library
 # #    -DUSG_COMPAT=2 # support and define variables
 # # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix
-# # Systems Group code and are required by POSIX.1-2008 and later (with XSI).
+# # Systems Group code and are required by POSIX.1-2008 and later (with XSI),
+# # although their contents are unspecified if you use a geographical TZ
+# # and the variables are planned to be removed in a future edition of POSIX.
 # # If not defined, the code attempts to guess USG_COMPAT from other macros.
 # #
 # # To support the external variable "altzone", add
@@ -428,18 +437,13 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
 
 # The name of a POSIX-like library archiver, its flags, C compiler,
 # linker flags, and 'make' utility.  Ordinarily the defaults suffice.
-# The commented-out values are the defaults specified by POSIX.1-202x/D4.
+# The commented-out values are the defaults specified by POSIX.1-2024.
 #AR = ar
 #ARFLAGS = -rv
 #CC = c17
 #LDFLAGS =
 #MAKE = make
 
-# For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
-# submake command lines.  The default is no leap seconds.
-
-LEAPSECONDS=
-
 # Where to fetch leap-seconds.list from.
 leaplist_URI = \
   https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list
@@ -461,7 +465,7 @@ ZFLAGS=
 
 # How to use zic to install TZif files.
 
-ZIC_INSTALL=   $(ZIC) -d '$(DESTDIR)$(TZDIR)' $(LEAPSECONDS)
+ZIC_INSTALL=   $(ZIC) -d '$(DESTDIR)$(TZDIR)'
 
 # The name of a POSIX-compliant 'awk' on your system.
 # mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work.
@@ -480,6 +484,7 @@ KSHELL=             /bin/bash
 
 # Name of curl <https://curl.haxx.se/>, used for HTML validation
 # and to fetch leap-seconds.list from upstream.
+# Set CURL=: to disable use of the Internet.
 CURL=          curl
 
 # Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
@@ -533,21 +538,28 @@ OK_LINE=  '^'$(OK_CHAR)'*$$'
 
 # Flags to give 'tar' when making a distribution.
 # Try to use flags appropriate for GNU tar.
-GNUTARFLAGS= --format=pax --pax-option='delete=atime,delete=ctime' \
+GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \
   --numeric-owner --owner=0 --group=0 \
   --mode=go+u,go-w --sort=name
-TARFLAGS=      `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
-                then echo $(GNUTARFLAGS); \
-                else :; \
-                fi`
+SETUP_TAR= \
+  export LC_ALL=C && \
+  if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \
+    TAR='tar $(GNUTARFLAGS)'; \
+  else \
+    TAR=tar; \
+  fi
 
 # Flags to give 'gzip' when making a distribution.
 GZIPFLAGS=     -9n
 
 # When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported.
 # This makes it easier to see which Zone has been affected.
-DIFF_TZS=       diff -u$$(! diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1 \
-                          || echo ' -F^TZ=')
+SETUP_DIFF_TZS = \
+  if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \
+    DIFF_TZS='diff -u -F^TZ='; \
+  else \
+    DIFF_TZS='diff -u'; \
+  fi
 
 # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
 RANLIB=                :
@@ -561,8 +573,8 @@ RANLIB=             :
 
 
 TZCOBJS=       zic.o
-TZDOBJS=       zdump.o localtime.o asctime.o strftime.o
-DATEOBJS=      date.o localtime.o strftime.o asctime.o
+TZDOBJS=       zdump.o localtime.o strftime.o
+DATEOBJS=      date.o localtime.o strftime.o
 LIBSRCS=       localtime.c asctime.c difftime.c strftime.c
 LIBOBJS=       localtime.o asctime.o difftime.o strftime.o
 HEADERS=       tzfile.h private.h
@@ -579,8 +591,7 @@ MANTXTS=    newctime.3.txt newstrftime.3.txt newtzset.3.txt 
\
 COMMON=                calendars CONTRIBUTING LICENSE Makefile \
                        NEWS README SECURITY theory.html version
 WEB_PAGES=     tz-art.html tz-how-to.html tz-link.html
-CHECK_WEB_PAGES=check_theory.html check_tz-art.html \
-                       check_tz-how-to.html check_tz-link.html
+CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck
 DOCS=          $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
 PRIMARY_YDATA= africa antarctica asia australasia \
                europe northamerica southamerica
@@ -641,8 +652,7 @@ install:    all $(DATA) $(REDO) $(MANS)
                        '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \
                        '$(DESTDIR)$(MANDIR)/man8'
                $(ZIC_INSTALL) -l $(LOCALTIME) \
-                       `case '$(POSIXRULES)' in ?*) echo '-p';; esac \
-                       ` $(POSIXRULES) \
+                       -p $(POSIXRULES) \
                        -t '$(DESTDIR)$(TZDEFAULT)'
                cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.'
                cp tzselect '$(DESTDIR)$(BINDIR)/.'
@@ -665,10 +675,10 @@ INSTALL:  ALL install date.1
 # and append "-dirty" if the contents do not already end in "-dirty".
 version:       $(VERSION_DEPS)
                { (type git) >/dev/null 2>&1 && \
-                 V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
-                               --abbrev=7 --dirty` || \
-                 if test '$(VERSION)' = unknown && V=`cat $@`; then \
-                   case $$V in *-dirty);; *) V=$$V-dirty;; esac; \
+                 V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
+                               --abbrev=7 --dirty) || \
+                 if test '$(VERSION)' = unknown && read -r V <$@; then \
+                   V=$${V%-dirty}-dirty; \
                  else \
                    V='$(VERSION)'; \
                  fi; } && \
@@ -678,7 +688,7 @@ version:    $(VERSION_DEPS)
 # These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST.
 vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
                $(AWK) \
-                 -v DATAFORM=`expr $@ : '\(.*\).zi'` \
+                 -v DATAFORM=$(@:.zi=) \
                  -v PACKRATDATA='$(PACKRATDATA)' \
                  -v PACKRATLIST='$(PACKRATLIST)' \
                  -f ziguard.awk \
@@ -687,7 +697,7 @@ vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS)
 # This file has a version comment that attempts to capture any tailoring
 # via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO.
 tzdata.zi:     $(DATAFORM).zi version zishrink.awk
-               version=`sed 1q version` && \
+               read -r version <version && \
                  LC_ALL=C $(AWK) \
                    -v dataform='$(DATAFORM)' \
                    -v deps='$(DSTDATA_ZI_DEPS) zishrink.awk' \
@@ -708,7 +718,7 @@ tzdir.h:
                mv $@.out $@
 
 version.h:     version
-               VERSION=`cat version` && printf '%s\n' \
+               read -r VERSION <version && printf '%s\n' \
                  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
                  "static char const TZVERSION[]=\"$$VERSION\";" \
                  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
@@ -748,12 +758,11 @@ commit-leap-seconds.list: fetch-leap-seconds.list
                git commit --author="$$author" --date="$$date" -m'make $@' \
                  leap-seconds.list
 
-# Arguments to pass to submakes of install_data.
+# Arguments to pass to submakes.
 # They can be overridden by later submake arguments.
 INSTALLARGS = \
  BACKWARD='$(BACKWARD)' \
  DESTDIR='$(DESTDIR)' \
- LEAPSECONDS='$(LEAPSECONDS)' \
  PACKRATDATA='$(PACKRATDATA)' \
  PACKRATLIST='$(PACKRATLIST)' \
  TZDEFAULT='$(TZDEFAULT)' \
@@ -762,16 +771,11 @@ INSTALLARGS = \
 
 INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
 
-# 'make install_data' installs one set of TZif files.
-install_data: $(INSTALL_DATA_DEPS)
-               $(ZIC_INSTALL) tzdata.zi
-
 posix_only: $(INSTALL_DATA_DEPS)
-               $(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data
+               $(ZIC_INSTALL) tzdata.zi
 
 right_only: $(INSTALL_DATA_DEPS)
-               $(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
-                       install_data
+               $(ZIC_INSTALL) -L leapseconds tzdata.zi
 
 # In earlier versions of this makefile, the other two directories were
 # subdirectories of $(TZDIR).  However, this led to configuration errors.
@@ -802,8 +806,7 @@ ZDS = dummy.zd
 # Rule used only by submakes invoked by the $(TZS_NEW) rule.
 # It is separate so that GNU 'make -j' can run instances in parallel.
 $(ZDS): zdump
-               ./zdump -i $(TZS_CUTOFF_FLAG) '$(wd)/'$$(expr $@ : '\(.*\).zd') 
\
-                 >$@
+               ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@
 
 TZS_NEW_DEPS = tzdata.zi zdump zic
 $(TZS_NEW): $(TZS_NEW_DEPS)
@@ -812,20 +815,19 @@ $(TZS_NEW): $(TZS_NEW_DEPS)
                $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi
                $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
                   tzdata.zi | LC_ALL=C sort >$@.out
-               wd=`pwd` && \
-               x=`$(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
+               x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \
                                tzdata.zi \
-                       | LC_ALL=C sort -t . -k 2,2` && \
+                    | LC_ALL=C sort -t . -k 2,2) && \
                set x $$x && \
                shift && \
                ZDS=$$* && \
-               $(MAKE) wd="$$wd" TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
+               $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \
                  ZDS="$$ZDS" $$ZDS && \
                sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out
                rm -fr tzs$(TZS_YEAR).dir
                mv $@.out $@
 
-# If $(TZS) exists but 'make check_tzs' fails, a maintainer should inspect the
+# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the
 # failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
 $(TZS):
                touch $@
@@ -842,7 +844,7 @@ date:               $(DATEOBJS)
                $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)
 
 tzselect:      tzselect.ksh version
-               VERSION=`cat version` && sed \
+               read -r VERSION <version && sed \
                  -e "s'#!/bin/bash'#!"'$(KSHELL)'\' \
                  -e s\''\(AWK\)=[^}]*'\''\1=\'\''$(AWK)\'\'\' \
                  -e s\''\(PKGVERSION\)=.*'\''\1=\'\''($(PACKAGE)) \'\'\' \
@@ -853,11 +855,11 @@ tzselect: tzselect.ksh version
                chmod +x $@.out
                mv $@.out $@
 
-check: check_back check_mild
-check_mild:    check_character_set check_white_space check_links \
-                 check_name_lengths check_now \
-                 check_slashed_abbrs check_sorted \
-                 check_tables check_web check_ziguard check_zishrink check_tzs
+check: check_mild back.ck
+check_mild: check_web check_zishrink \
+  character-set.ck white-space.ck links.ck mainguard.ck \
+  name-lengths.ck now.ck slashed-abbrs.ck sorted.ck \
+  tables.ck ziguard.ck tzs.ck
 
 # True if UTF8_LOCALE does not work;
 # otherwise, false but with LC_ALL set to $(UTF8_LOCALE).
@@ -865,9 +867,9 @@ UTF8_LOCALE_MISSING = \
   { test ! '$(UTF8_LOCALE)' \
     || ! printf 'A\304\200B\n' \
          | LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 \
-    || { LC_ALL='$(UTF8_LOCALE)'; export LC_ALL; false; }; }
+    || { export LC_ALL='$(UTF8_LOCALE)'; false; }; }
 
-check_character_set: $(ENCHILADA)
+character-set.ck: $(ENCHILADA)
        $(UTF8_LOCALE_MISSING) || { \
                sharp='#' && \
                ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
@@ -882,48 +884,55 @@ check_character_set: $(ENCHILADA)
        }
        touch $@
 
-check_white_space: $(ENCHILADA)
+white-space.ck: $(ENCHILADA)
        $(UTF8_LOCALE_MISSING) || { \
-               patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
+               enchilada='$(ENCHILADA)' && \
+               patfmt=' \t|[\f\r\v]' && pat=$$(printf "$$patfmt\\n") && \
                ! grep -En "$$pat|[$s]\$$" \
-                       $$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list); \
+                   $${enchilada%leap-seconds.list*} \
+                   $${enchilada#*leap-seconds.list}; \
        }
        touch $@
 
 PRECEDES_FILE_NAME = ^(Zone|Link[$s]+[^$s]+)[$s]+
 FILE_NAME_COMPONENT_TOO_LONG = $(PRECEDES_FILE_NAME)[^$s]*[^/$s]{15}
 
-check_name_lengths: $(TDATA_TO_CHECK) backzone
-               ! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
+name-lengths.ck: $(TDATA_TO_CHECK) backzone
+               :;! grep -En '$(FILE_NAME_COMPONENT_TOO_LONG)' \
                        $(TDATA_TO_CHECK) backzone
                touch $@
 
+mainguard.ck: main.zi
+               test '$(PACKRATLIST)' || \
+                 cat $(TDATA) $(PACKRATDATA) | diff -u - main.zi
+               touch $@
+
 PRECEDES_STDOFF = ^(Zone[$s]+[^$s]+)?[$s]+
 STDOFF = [-+]?[0-9:.]+
 RULELESS_SAVE = (-|$(STDOFF)[sd]?)
 RULELESS_SLASHED_ABBRS = \
   $(PRECEDES_STDOFF)$(STDOFF)[$s]+$(RULELESS_SAVE)[$s]+[^$s]*/
 
-check_slashed_abbrs: $(TDATA_TO_CHECK)
-               ! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
+slashed-abbrs.ck: $(TDATA_TO_CHECK)
+               :;! grep -En '$(RULELESS_SLASHED_ABBRS)' $(TDATA_TO_CHECK)
                touch $@
 
 CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; 
}
 
-check_sorted: backward backzone
+sorted.ck: backward backzone
                $(AWK) '/^Link/ {printf "%.5d %s\n", g, $$3} !/./ {g++}' \
                  backward | LC_ALL=C sort -cu
-               $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
+               $(AWK) '/^Zone.*\// {print $$2}' backzone | LC_ALL=C sort -cu
                touch $@
 
-check_back:    checklinks.awk $(TDATA_TO_CHECK)
+back.ck: checklinks.awk $(TDATA_TO_CHECK)
                $(AWK) \
                  -v DATAFORM=$(DATAFORM) \
                  -v backcheck=backward \
                  -f checklinks.awk $(TDATA_TO_CHECK)
                touch $@
 
-check_links:   checklinks.awk tzdata.zi
+links.ck: checklinks.awk tzdata.zi
                $(AWK) \
                  -v DATAFORM=$(DATAFORM) \
                  -f checklinks.awk tzdata.zi
@@ -932,26 +941,36 @@ check_links:      checklinks.awk tzdata.zi
 # Check timestamps from now through 28 years from now, to make sure
 # that zonenow.tab contains all sequences of planned timestamps,
 # without any duplicate sequences.  In theory this might require
-# 2800 years but that would take a long time to check.
-CHECK_NOW_TIMESTAMP = `./date +%s`
+# 2800+ years but that would take a long time to check.
+CHECK_NOW_TIMESTAMP = $$(./date +%s)
 CHECK_NOW_FUTURE_YEARS = 28
-CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) '*' 366 '*' 24 '*' 60 '*' 60
-check_now:     checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
-               rm -fr $@.dir
-               mkdir $@.dir
-               ./zic -d $@.dir tzdata.zi
+CHECK_NOW_FUTURE_SECS = $(CHECK_NOW_FUTURE_YEARS) * 366 * 24 * 60 * 60
+now.ck: checknow.awk date tzdata.zi zdump zic zone1970.tab zonenow.tab
+               rm -fr $@d
+               mkdir $@d
+               ./zic -d $@d tzdata.zi
                now=$(CHECK_NOW_TIMESTAMP) && \
-                 future=`expr $(CHECK_NOW_FUTURE_SECS) + $$now` && \
+                 future=$$(($(CHECK_NOW_FUTURE_SECS) + $$now)) && \
                  ./zdump -i -t $$now,$$future \
-                    $$(find $$PWD/$@.dir/????*/ -type f) \
-                    >$@.dir/zdump.tab
+                    $$(find "$$PWD/$@d"/????*/ -type f) \
+                    >$@d/zdump-now.tab && \
+                 ./zdump -i -t 0,$$future \
+                    $$(find "$$PWD/$@d" -name Etc -prune \
+                         -o -type f ! -name '*.tab' -print) \
+                    >$@d/zdump-1970.tab
                $(AWK) \
-                 -v zdump_table=$@.dir/zdump.tab \
+                 -v zdump_table=$@d/zdump-now.tab \
                  -f checknow.awk zonenow.tab
-               rm -fr $@.dir
+               $(AWK) \
+                 'BEGIN {print "-\t-\tUTC"} /^Zone/ {print "-\t-\t" $$2}' \
+                 $(PRIMARY_YDATA) backward factory | \
+                $(AWK) \
+                  -v zdump_table=$@d/zdump-1970.tab \
+                  -f checknow.awk
+               rm -fr $@d
                touch $@
 
-check_tables:  checktab.awk $(YDATA) backward zone.tab zone1970.tab
+tables.ck: checktab.awk $(YDATA) backward zone.tab zone1970.tab
                for tab in $(ZONETABLES); do \
                  test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \
                  $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \
@@ -959,26 +978,24 @@ check_tables:     checktab.awk $(YDATA) backward zone.tab 
zone1970.tab
                done
                touch $@
 
-check_tzs:     $(TZS) $(TZS_NEW)
+tzs.ck: $(TZS) $(TZS_NEW)
                if test -s $(TZS); then \
-                 $(DIFF_TZS) $(TZS) $(TZS_NEW); \
+                 $(SETUP_DIFF_TZS) && $$DIFF_TZS $(TZS) $(TZS_NEW); \
                else \
                  cp $(TZS_NEW) $(TZS); \
                fi
                touch $@
 
 check_web:     $(CHECK_WEB_PAGES)
-check_theory.html: theory.html
-check_tz-art.html: tz-art.html
-check_tz-how-to.html: tz-how-to.html
-check_tz-link.html: tz-link.html
-check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html:
-               $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
-                   -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \
+.SUFFIXES: .ck .html
+.html.ck:
+               { ! ($(CURL) --version) >/dev/null 2>&1 || \
+                   $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
+                         -F file=@$<; } >$@.out && \
                  test ! -s $@.out || { cat $@.out; exit 1; }
                mv $@.out $@
 
-check_ziguard: rearguard.zi vanguard.zi ziguard.awk
+ziguard.ck: rearguard.zi vanguard.zi ziguard.awk
                $(AWK) -v DATAFORM=rearguard -f ziguard.awk vanguard.zi | \
                  diff -u rearguard.zi -
                $(AWK) -v DATAFORM=vanguard -f ziguard.awk rearguard.zi | \
@@ -987,36 +1004,35 @@ check_ziguard: rearguard.zi vanguard.zi ziguard.awk
 
 # Check that zishrink.awk does not alter the data, and that ziguard.awk
 # preserves main-format data.
-check_zishrink: check_zishrink_posix check_zishrink_right
-check_zishrink_posix check_zishrink_right: \
+check_zishrink: zishrink-posix.ck zishrink-right.ck
+zishrink-posix.ck zishrink-right.ck: \
   zic leapseconds $(PACKRATDATA) $(PACKRATLIST) \
   $(TDATA) $(DATAFORM).zi tzdata.zi
-               rm -fr $@.dir $@-t.dir $@-shrunk.dir
-               mkdir $@.dir $@-t.dir $@-shrunk.dir
+               rm -fr $@d t-$@d shrunk-$@d
+               mkdir $@d t-$@d shrunk-$@d
                case $@ in \
-                 *_right) leap='-L leapseconds';; \
+                 *right*) leap='-L leapseconds';; \
                  *) leap=;; \
                esac && \
-                 $(ZIC) $$leap -d $@.dir $(DATAFORM).zi && \
-                 $(ZIC) $$leap -d $@-shrunk.dir tzdata.zi && \
+                 $(ZIC) $$leap -d $@d $(DATAFORM).zi && \
+                 $(ZIC) $$leap -d shrunk-$@d tzdata.zi && \
                  case $(DATAFORM),$(PACKRATLIST) in \
                    main,) \
-                     $(ZIC) $$leap -d $@-t.dir $(TDATA) && \
+                     $(ZIC) $$leap -d t-$@d $(TDATA) && \
                      $(AWK) '/^Rule/' $(TDATA) | \
-                       $(ZIC) $$leap -d $@-t.dir - $(PACKRATDATA) && \
-                     diff -r $@.dir $@-t.dir;; \
+                       $(ZIC) $$leap -d t-$@d - $(PACKRATDATA) && \
+                     diff -r $@d t-$@d;; \
                  esac
-               diff -r $@.dir $@-shrunk.dir
-               rm -fr $@.dir $@-t.dir $@-shrunk.dir
+               diff -r $@d shrunk-$@d
+               rm -fr $@d t-$@d shrunk-$@d
                touch $@
 
 clean_misc:
-               rm -fr check_*.dir typecheck_*.dir
-               rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
-                 check_* core typecheck_* \
+               rm -fr *.ckd *.dir
+               rm -f *.ck *.core *.o *.out core core.* \
                  date tzdir.h tzselect version.h zdump zic libtz.a
 clean:         clean_misc
-               rm -fr *.dir tzdb-*/
+               rm -fr tzdb-*/
                rm -f *.zi $(TZS_NEW)
 
 maintainer-clean: clean
@@ -1027,7 +1043,7 @@ maintainer-clean: clean
 names:
                @echo $(ENCHILADA)
 
-public:                check check_public $(CHECK_TIME_T_ALTERNATIVES) \
+public: check public.ck $(CHECK_TIME_T_ALTERNATIVES) \
                tarballs signatures
 
 date.1.txt:    date.1
@@ -1041,7 +1057,7 @@ zdump.8.txt:      zdump.8
 zic.8.txt:     zic.8
 
 $(MANTXTS):    workman.sh
-               LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out
+               LC_ALL=C sh workman.sh $(@:.txt=) >$@.out
                mv $@.out $@
 
 # Set file timestamps deterministically if possible,
@@ -1054,13 +1070,13 @@ SET_TIMESTAMP_N = sh -c '\
   n=$$0 dest=$$1; shift; \
   <"$$dest" && \
   if test $$n != 0 && \
-     lsout=`ls -nt --time-style="+%s" "$$@" 2>/dev/null`; then \
+     lsout=$$(ls -nt --time-style="+%s" "$$@" 2>/dev/null); then \
     set x $$lsout && \
-    timestamp=`expr $$7 + $$n` && \
+    timestamp=$$(($$7 + $$n)) && \
     echo "+ touch -md @$$timestamp $$dest" && \
     touch -md @$$timestamp "$$dest"; \
   else \
-    newest=`ls -t "$$@" | sed 1q` && \
+    newest=$$(ls -t "$$@" | sed 1q) && \
     echo "+ touch -mr $$newest $$dest" && \
     touch -mr "$$newest" "$$dest"; \
   fi'
@@ -1083,15 +1099,15 @@ SET_TIMESTAMP_DEP = $(SET_TIMESTAMP_N) 1
 set-timestamps.out: $(EIGHT_YARDS)
                rm -f $@
                if (type git) >/dev/null 2>&1 && \
-                  files=`git ls-files $(EIGHT_YARDS)` && \
+                  files=$$(git ls-files $(EIGHT_YARDS)) && \
                   touch -md @1 test.out; then \
                  rm -f test.out && \
                  for file in $$files; do \
                    if git diff --quiet $$file; then \
-                     time=`TZ=UTC0 git log -1 \
+                     time=$$(TZ=UTC0 git log -1 \
                        --format='tformat:%cd' \
                        --date='format:%Y-%m-%dT%H:%M:%SZ' \
-                       $$file` && \
+                       $$file) && \
                      echo "+ touch -md $$time $$file" && \
                      touch -md $$time $$file; \
                    else \
@@ -1100,8 +1116,8 @@ set-timestamps.out: $(EIGHT_YARDS)
                  done; \
                fi
                $(SET_TIMESTAMP_DEP) leapseconds $(LEAP_DEPS)
-               for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
-                 $(SET_TIMESTAMP_DEP) $$file.txt $$file workman.sh || \
+               for file in $(MANTXTS); do \
+                 $(SET_TIMESTAMP_DEP) $$file $${file%.txt} workman.sh || \
                    exit; \
                done
                $(SET_TIMESTAMP_DEP) version $(VERSION_DEPS)
@@ -1114,30 +1130,29 @@ set-tzs-timestamp.out: $(TZS)
 # The zics below ensure that each data file can stand on its own.
 # We also do an all-files run to catch links to links.
 
-check_public: $(VERSION_DEPS)
-               rm -fr public.dir
-               mkdir public.dir
-               ln $(VERSION_DEPS) public.dir
-               cd public.dir \
+public.ck: $(VERSION_DEPS)
+               rm -fr $@d
+               mkdir $@d
+               ln $(VERSION_DEPS) $@d
+               cd $@d \
                  && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' TZDIR='$(TZDIR)' ALL
-               for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \
-                   public.dir/vanguard.zi public.dir/main.zi \
-                   public.dir/rearguard.zi; \
+               for i in $(TDATA_TO_CHECK) \
+                   tzdata.zi vanguard.zi main.zi rearguard.zi; \
                do \
-                 public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \
+                 $@d/zic -v -d $@d/zoneinfo $@d/$$i || exit; \
                done
-               public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK)
+               $@d/zic -v -d $@d/zoneinfo-all $(TDATA_TO_CHECK)
                :
                : Also check 'backzone' syntax.
-               rm public.dir/main.zi
-               cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi
-               public.dir/zic -d public.dir/zoneinfo main.zi
-               rm public.dir/main.zi
-               cd public.dir && \
+               rm $@d/main.zi
+               cd $@d && $(MAKE) PACKRATDATA=backzone main.zi
+               $@d/zic -d $@d/zoneinfo main.zi
+               rm $@d/main.zi
+               cd $@d && \
                  $(MAKE) PACKRATDATA=backzone PACKRATLIST=zone.tab main.zi
-               public.dir/zic -d public.dir/zoneinfo main.zi
+               $@d/zic -d $@d/zoneinfo main.zi
                :
-               rm -fr public.dir
+               rm -fr $@d
                touch $@
 
 # Check that the code works under various alternative
@@ -1145,46 +1160,47 @@ check_public: $(VERSION_DEPS)
 check_time_t_alternatives: $(TIME_T_ALTERNATIVES)
 $(TIME_T_ALTERNATIVES_TAIL): $(TIME_T_ALTERNATIVES_HEAD)
 $(TIME_T_ALTERNATIVES): $(VERSION_DEPS)
-               rm -fr $@.dir
-               mkdir $@.dir
-               ln $(VERSION_DEPS) $@.dir
+               rm -fr $@d
+               mkdir $@d
+               ln $(VERSION_DEPS) $@d
                case $@ in \
-                 int*32_t) range=-2147483648,2147483648;; \
+                 *32_t*) range=-2147483648,2147483648;; \
                  u*) range=0,4294967296;; \
                  *) range=-4294967296,4294967296;; \
                esac && \
-               wd=`pwd` && \
-               zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
+               wd=$$PWD && \
+               zones=$$($(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab) && \
                if test $@ = $(TIME_T_ALTERNATIVES_HEAD); then \
                  range_target=; \
                else \
                  range_target=to$$range.tzs; \
                fi && \
-               (cd $@.dir && \
-                 $(MAKE) TOPDIR="$$wd/$@.dir" \
-                   CFLAGS='$(CFLAGS) -Dtime_tz='"'$@'" \
+               (cd $@d && \
+                 $(MAKE) TOPDIR="$$wd/$@d" \
+                   CFLAGS='$(CFLAGS) -Dtime_tz='"'$(@:.ck=)'" \
                    REDO='$(REDO)' \
-                       D=$$wd/$@.dir \
+                   D="$$wd/$@d" \
                    TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
                    install $$range_target) && \
                test $@ = $(TIME_T_ALTERNATIVES_HEAD) || { \
-                 (cd $(TIME_T_ALTERNATIVES_HEAD).dir && \
-                   $(MAKE) TOPDIR="$$wd/$@.dir" \
+                 (cd $(TIME_T_ALTERNATIVES_HEAD)d && \
+                   $(MAKE) TOPDIR="$$wd/$@d" \
                      TZS_YEAR="$$range" TZS_CUTOFF_FLAG="-t $$range" \
-                       D=$$wd/$@.dir \
+                     D="$$wd/$@d" \
                      to$$range.tzs) && \
-                 $(DIFF_TZS) $(TIME_T_ALTERNATIVES_HEAD).dir/to$$range.tzs \
-                         $@.dir/to$$range.tzs && \
+                 $(SETUP_DIFF_TZS) && \
+                 $$DIFF_TZS $(TIME_T_ALTERNATIVES_HEAD)d/to$$range.tzs \
+                         $@d/to$$range.tzs && \
                  if diff -q Makefile Makefile 2>/dev/null; then \
                    quiet_option='-q'; \
                  else \
                    quiet_option=''; \
                  fi && \
-                   diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD).dir/etc \
-                                          $@.dir/etc && \
+                   diff $$quiet_option -r $(TIME_T_ALTERNATIVES_HEAD)d/etc \
+                                          $@d/etc && \
                    diff $$quiet_option -r \
-                     $(TIME_T_ALTERNATIVES_HEAD).dir/usr/share \
-                     $@.dir/usr/share; \
+                     $(TIME_T_ALTERNATIVES_HEAD)d/usr/share \
+                     $@d/usr/share; \
                }
                touch $@
 
@@ -1199,7 +1215,7 @@ ALL_ASC = $(TRADITIONAL_ASC) $(REARGUARD_ASC) \
 tarballs rearguard_tarballs tailored_tarballs traditional_tarballs \
 signatures rearguard_signatures traditional_signatures: \
   version set-timestamps.out rearguard.zi vanguard.zi
-               VERSION=`cat version` && \
+               read -r VERSION <version && \
                $(MAKE) AWK='$(AWK)' VERSION="$$VERSION" $@_version
 
 # These *_version rules are intended for use if VERSION is set by some
@@ -1218,15 +1234,15 @@ rearguard_signatures_version: $(REARGUARD_ASC)
 traditional_signatures_version: $(TRADITIONAL_ASC)
 
 tzcode$(VERSION).tar.gz: set-timestamps.out
-               LC_ALL=C && export LC_ALL && \
-               tar $(TARFLAGS) -cf - \
+               $(SETUP_TAR) && \
+               $$TAR -cf - \
                    $(COMMON) $(DOCS) $(SOURCES) | \
                  gzip $(GZIPFLAGS) >$@.out
                mv $@.out $@
 
 tzdata$(VERSION).tar.gz: set-timestamps.out
-               LC_ALL=C && export LC_ALL && \
-               tar $(TARFLAGS) -cf - $(TZDATA_DIST) | \
+               $(SETUP_TAR) && \
+               $$TAR -cf - $(TZDATA_DIST) | \
                  gzip $(GZIPFLAGS) >$@.out
                mv $@.out $@
 
@@ -1251,9 +1267,9 @@ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi 
set-timestamps.out
                : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
                $(CREATE_EMPTY) $@.dir/pacificnew
                touch -mr version $@.dir/version
-               LC_ALL=C && export LC_ALL && \
+               $(SETUP_TAR) && \
                  (cd $@.dir && \
-                  tar $(TARFLAGS) -cf - \
+                  $$TAR -cf - \
                        $(TZDATA_DIST) pacificnew | \
                     gzip $(GZIPFLAGS)) >$@.out
                mv $@.out $@
@@ -1269,9 +1285,14 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
                rm -fr $@.dir
                mkdir $@.dir
                : The dummy pacificnew pacifies TZUpdater 2.3.1 and earlier.
+               if test $(DATAFORM) = vanguard; then \
+                 pacificnew=; \
+               else \
+                 pacificnew=pacificnew; \
+               fi && \
                cd $@.dir && \
                  $(CREATE_EMPTY) $(PRIMARY_YDATA) $(NDATA) backward \
-                 `test $(DATAFORM) = vanguard || echo pacificnew`
+                 $$pacificnew
                (grep '^#' tzdata.zi && echo && cat $(DATAFORM).zi) \
                  >$@.dir/etcetera
                touch -mr tzdata.zi $@.dir/etcetera
@@ -1291,9 +1312,9 @@ tzdata$(VERSION)-tailored.tar.gz: set-timestamps.out
                    test -f $@.dir/$$file || links="$$links $$file"; \
                  done && \
                  ln $$links $@.dir
-               LC_ALL=C && export LC_ALL && \
+               $(SETUP_TAR) && \
                  (cd $@.dir && \
-                  tar $(TARFLAGS) -cf - * | gzip $(GZIPFLAGS)) >$@.out
+                  $$TAR -cf - * | gzip $(GZIPFLAGS)) >$@.out
                mv $@.out $@
 
 tzdb-$(VERSION).tar.lz: set-timestamps.out set-tzs-timestamp.out
@@ -1301,8 +1322,8 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out 
set-tzs-timestamp.out
                mkdir tzdb-$(VERSION)
                ln $(ENCHILADA) tzdb-$(VERSION)
                $(SET_TIMESTAMP) tzdb-$(VERSION) tzdb-$(VERSION)/*
-               LC_ALL=C && export LC_ALL && \
-               tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out
+               $(SETUP_TAR) && \
+               $$TAR -cf - tzdb-$(VERSION) | lzip -9 >$@.out
                mv $@.out $@
 
 tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
@@ -1313,22 +1334,21 @@ $(ALL_ASC):
                $(GPG) --armor --detach-sign $?
 
 TYPECHECK_CFLAGS = $(CFLAGS) -DTYPECHECK -D__time_t_defined -D_TIME_T
-typecheck: typecheck_long_long typecheck_unsigned
-typecheck_long_long typecheck_unsigned: $(VERSION_DEPS)
-               rm -fr $@.dir
-               mkdir $@.dir
-               ln $(VERSION_DEPS) $@.dir
-               cd $@.dir && \
+typecheck: long-long.ck unsigned.ck
+long-long.ck unsigned.ck: $(VERSION_DEPS)
+               rm -fr $@d
+               mkdir $@d
+               ln $(VERSION_DEPS) $@d
+               cd $@d && \
                  case $@ in \
-                   *_long_long) i="long long";; \
-                   *_unsigned ) i="unsigned" ;; \
+                   long-long.*) i="long long";; \
+                   unsigned.* ) i="unsigned" ;; \
                  esac && \
-                 typecheck_cflags='' && \
                  $(MAKE) \
                    CFLAGS="$(TYPECHECK_CFLAGS) \"-Dtime_t=$$i\"" \
-                   TOPDIR="`pwd`" \
*** 4277 LINES SKIPPED ***

Reply via email to