@@ -21,7 +21,7 @@ DATAFORM= main
2121
2222# Change the line below for your time zone (after finding the zone you want in
2323# the time zone files, or adding it to a time zone file).
24- # Alternately , if you discover you've got the wrong time zone, you can just
24+ # Alternatively , if you discover you've got the wrong time zone, you can just
2525# zic -l rightzone
2626# to correct things.
2727# Use the command
@@ -38,7 +38,7 @@ LOCALTIME= GMT
3838# template file are used to determine "spring forward" and "fall back" days and
3939# times; the environment variable itself specifies UT offsets of standard and
4040# daylight saving time.
41- # Alternately , if you discover you've got the wrong time zone, you can just
41+ # Alternatively , if you discover you've got the wrong time zone, you can just
4242# zic -p rightzone
4343# to correct things.
4444# Use the command
@@ -236,14 +236,16 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
236236 $(GCC_INSTRUMENT ) \
237237 -Wall -Wextra \
238238 -Walloc-size-larger-than=100000 -Warray-bounds=2 \
239- -Wbad-function-cast -Wcast-align -Wdate-time \
239+ -Wbad-function-cast -Wcast-align=strict -Wdate-time \
240240 -Wdeclaration-after-statement -Wdouble-promotion \
241241 -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
242242 -Winit-self -Wjump-misses-init -Wlogical-op \
243243 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
244244 -Wold-style-definition -Woverlength-strings -Wpointer-arith \
245- -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=5 \
245+ -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \
246+ -Wstringop-truncation -Wsuggest-attribute=cold \
246247 -Wsuggest-attribute=const -Wsuggest-attribute=format \
248+ -Wsuggest-attribute=malloc \
247249 -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \
248250 -Wtrampolines -Wundef -Wuninitialized -Wunused \
249251 -Wvariadic-macros -Wvla -Wwrite-strings \
@@ -514,6 +516,7 @@ VERSION_DEPS= \
514516 tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
515517 workman.sh yearistype.sh \
516518 zdump.8 zdump.c zic.8 zic.c \
519+ ziguard.awk zishrink.awk \
517520 zone.tab zone1970.tab zoneinfo2tdf.pl
518521
519522# And for the benefit of csh users on systems that assume the user
@@ -559,8 +562,8 @@ version: $(VERSION_DEPS)
559562
560563# These files can be tailored by setting BACKWARD, PACKRATDATA, etc.
561564vanguard.zi main.zi rearguard.zi: $( DSTDATA_ZI_DEPS)
562- $( AWK) -v outfile= ' $@ ' -f ziguard.awk $( TDATA ) $( PACKRATDATA ) \
563- > $@ .out
565+ $( AWK) -v DATAFORM= ` expr $@ : '\(.*\).zi' ` -f ziguard.awk \
566+ $( TDATA ) $( PACKRATDATA ) > $@ .out
564567 mv $@ .out $@
565568tzdata.zi: $( DATAFORM) .zi version
566569 version= ` sed 1q version` && \
@@ -900,19 +903,27 @@ check_time_t_alternatives:
900903 done
901904 rm -fr time_t.dir
902905
906+ TRADITIONAL_ASC = \
907+ tzcode$(VERSION).tar.gz.asc \
908+ tzdata$(VERSION).tar.gz.asc
909+ ALL_ASC = $(TRADITIONAL_ASC) \
910+ tzdata$(VERSION)-rearguard.tar.gz.asc \
911+ tzdb-$(VERSION).tar.lz.asc
912+
903913tarballs traditional_tarballs signatures traditional_signatures: version
904914 VERSION=`cat version` && \
905915 $(MAKE) VERSION="$$VERSION" $@_version
906916
907917# These *_version rules are intended for use if VERSION is set by some
908918# other means. Ordinarily these rules are used only by the above
909919# non-_version rules, which set VERSION on the ' make' command line.
910- tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
920+ tarballs_version: traditional_tarballs_version \
921+ tzdata$(VERSION)-rearguard.tar.gz \
922+ tzdb-$(VERSION).tar.lz
911923traditional_tarballs_version: \
912924 tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
913- signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
914- traditional_signatures_version: \
915- tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
925+ signatures_version: $(ALL_ASC)
926+ traditional_signatures_version: $(TRADITIONAL_ASC)
916927
917928tzcode$(VERSION).tar.gz: set-timestamps.out
918929 LC_ALL=C && export LC_ALL && \
@@ -927,6 +938,26 @@ tzdata$(VERSION).tar.gz: set-timestamps.out
927938 gzip $(GZIPFLAGS) >[email protected] 928939929940
941+ tzdata$(VERSION)-rearguard.tar.gz: rearguard.zi set-timestamps.out
942+ rm -fr tzdata$(VERSION)-rearguard.dir
943+ mkdir tzdata$(VERSION)-rearguard.dir
944+ ln $(COMMON) $(DATA) $(MISC) tzdata$(VERSION)-rearguard.dir
945+ cd tzdata$(VERSION)-rearguard.dir && \
946+ rm -f $(TDATA) $(PACKRATDATA) version
947+ for f in $(TDATA) $(PACKRATDATA); do \
948+ rearf=tzdata$(VERSION)-rearguard.dir/$$f; \
949+ $(AWK) -v DATAFORM=rearguard -f ziguard.awk $$f >$$rearf && \
950+ touch -cmr `ls -t ziguard.awk $$f` $$rearf || exit; \
951+ done
952+ sed ' 1s/$$ /-rearguard/' \
953+ <version >tzdata$(VERSION)-rearguard.dir/version
954+ touch -cmr version tzdata$(VERSION)-rearguard.dir/version
955+ LC_ALL=C && export LC_ALL && \
956+ (cd tzdata$(VERSION)-rearguard.dir && \
957+ tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
958+ gzip $(GZIPFLAGS)) >[email protected] 959+ 960+
930961tzdb-$(VERSION).tar.lz: set-timestamps.out
931962 rm -fr tzdb-$(VERSION)
932963 mkdir tzdb-$(VERSION)
@@ -937,12 +968,10 @@ tzdb-$(VERSION).tar.lz: set-timestamps.out
937968938969
939970tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
940- gpg --armor --detach-sign $?
941-
942971tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
943- gpg --armor --detach-sign $?
944-
972+ tzdata$(VERSION)-rearguard.tar.gz.asc: tzdata$(VERSION)-rearguard.tar.gz
945973tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
974+ $(ALL_ASC):
946975 gpg --armor --detach-sign $?
947976
948977typecheck:
0 commit comments