1- # <pre>
21# This file is in the public domain, so clarified as of
32# 2009-05-17 by Arthur David Olson.
43
54# Package name for the code distribution.
65PACKAGE = tzcode
76
87# Version numbers of the code and data distributions.
9- VERSION = 2014e
8+ VERSION = 2014f
109
1110# Email address for bug reports.
1211@@ -96,14 +95,14 @@ REDO= posix_right
9695YEARISTYPE = ./yearistype
9796
9897# Non-default libraries needed to link.
99- # Add -lintl if you want to use ` gettext' on Solaris.
98+ # Add -lintl if you want to use ' gettext' on Solaris.
10099LDLIBS =
101100
102101# Add the following to the end of the "CFLAGS=" line as needed.
103102# -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
104- # -DHAVE_ADJTIME=0 if ` adjtime' does not exist (SVR0?)
103+ # -DHAVE_ADJTIME=0 if ' adjtime' does not exist (SVR0?)
105104# -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
106- # -DHAVE_GETTEXT=1 if ` gettext' works (GNU, Linux, Solaris); also see LDLIBS
105+ # -DHAVE_GETTEXT=1 if ' gettext' works (GNU, Linux, Solaris); also see LDLIBS
107106# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
108107# ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
109108# -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
@@ -124,7 +123,7 @@ LDLIBS=
124123# year 2000 grief
125124# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
126125# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
127- # -TTZ_DOMAINDIR =\"/path\" to use "/path" for gettext directory;
126+ # -DTZ_DOMAINDIR =\"/path\" to use "/path" for gettext directory;
128127# the default is system-supplied, typically "/usr/lib/locale"
129128# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
130129# DST transitions if the time zone files cannot be accessed
@@ -135,14 +134,16 @@ LDLIBS=
135134GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
136135 -Wall -Wextra \
137136 -Wbad-function-cast -Wcast-align -Wcast-qual \
138- -Wformat=2 -Winit-self \
137+ -Wdeclaration-after-statement \
138+ -Wformat=2 -Winit-self -Wjump-misses-init \
139139 -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
140140 -Wnested-externs -Wno-address -Wno-cast-qual \
141141 -Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
142142 -Wno-type-limits \
143143 -Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
144144 -Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
145- -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wtrampolines \
145+ -Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
146+ -Wsuggest-attribute=pure -Wtrampolines \
146147 -Wwrite-strings
147148#
148149# If you want to use System V compatibility code, add
@@ -236,7 +237,7 @@ ZIC= $(zic) $(ZFLAGS)
236237
237238ZFLAGS =
238239
239- # The name of a Posix-compliant ` awk' on your system.
240+ # The name of a Posix-compliant ' awk' on your system.
240241AWK = awk
241242
242243# The full path name of a Posix-compliant shell, preferably one that supports
@@ -266,16 +267,34 @@ VALIDATE_ENV = \
266267 SP_CHARSET_FIXED=YES \
267268 SP_ENCODING=UTF-8
268269
269- # INVALID_CHAR is a regular expression that matches invalid characters in
270- # distributed files. For now, stick to a safe subset of ASCII.
270+ # SAFE_CHAR is a regular expression that matches a safe character.
271+ # Some parts of this distribution are limited to safe characters;
272+ # others can use any UTF-8 character.
273+ # For now, the safe characters are a safe subset of ASCII.
271274# The caller must set the shell variable 'sharp' to the character '#',
272275# since Makefile macros cannot contain '#'.
273276# TAB_CHAR is a single tab character, in single quotes.
274277TAB_CHAR = ' '
275- INVALID_CHAR1 = $(TAB_CHAR ) ' !\"'$$sharp'$$% &'\''()*+,./0123456789:;<=>?@'
276- INVALID_CHAR2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_` '
277- INVALID_CHAR3= ' abcdefghijklmnopqrstuvwxyz{| }~'
278- INVALID_CHAR= ' [^]' $(INVALID_CHAR1)$(INVALID_CHAR2)$(INVALID_CHAR3)' -]'
278+ SAFE_CHARSET1 = $(TAB_CHAR ) ' !\"'$$sharp'$$% &'\''()*+,./0123456789:;<=>?@'
279+ SAFE_CHARSET2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_` '
280+ SAFE_CHARSET3= ' abcdefghijklmnopqrstuvwxyz{| }~'
281+ SAFE_CHARSET= ]$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)-
282+ SAFE_CHAR= ' [' $(SAFE_CHARSET)' ]'
283+ # NONSYM_CHAR is a regular expression that matches any character
284+ # except for a small number of symbols, where we prefer to stick with
285+ # ASCII renderings for the convenience of maintainers whose text editors
286+ # mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
287+ NONSYM_CHAR= ' [^–—°′″≈≠≤≥±−×÷∞←→↔·•§¶«»‘’‚‛“”„‟‹›「」『』〝〞〟]'
288+
289+ # SAFE_LINE matches a line of safe characters.
290+ # SAFE_SHARP_LINE is similar, except any character can follow ' # ';
291+ # this is so that comments can contain non-ASCII characters.
292+ # NONSYM_LINE matches a line of non-symbols.
293+ # VALID_LINE matches a line of any validly-encoded characters.
294+ SAFE_LINE= ' ^' $( SAFE_CHAR) ' *$$'
295+ SAFE_SHARP_LINE=' ^' $( SAFE_CHAR) ' *(' $$ sharp$( NONSYM_CHAR) ' *)?$$'
296+ NONSYM_LINE= ' ^' $( NONSYM_CHAR) ' *$$'
297+ VALID_LINE= ' ^.*$$'
279298
280299# Flags to give 'tar' when making a distribution.
281300# Try to use flags appropriate for GNU tar.
@@ -298,7 +317,7 @@ AR= ar
298317# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
299318RANLIB= :
300319
301- TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
320+ TZCOBJS= zic.o scheck.o ialloc.o
302321TZDOBJS= zdump.o localtime.o ialloc.o asctime.o
303322DATEOBJS= date.o localtime.o strftime.o asctime.o
304323LIBSRCS= localtime.c asctime.c difftime.c
@@ -314,21 +333,20 @@ MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \
314333 tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
315334 date.1.txt
316335COMMON= Makefile README
317- DOCS= NEWS Theory $(MANS) date.1 $(MANTXTS)
336+ WEB_PAGES= tz-art.htm tz-link.htm
337+ DOCS= NEWS Theory $( MANS) date.1 $( MANTXTS) $( WEB_PAGES)
318338PRIMARY_YDATA= africa antarctica asia australasia \
319339 europe northamerica southamerica
320340YDATA= $( PRIMARY_YDATA) pacificnew etcetera backward
321341NDATA= systemv factory
322342TDATA= $( YDATA) $( NDATA)
323- TABDATA= iso3166.tab zone.tab leapseconds
343+ ZONETABLES= zone1970.tab zone.tab
344+ TABDATA= iso3166.tab leapseconds $( ZONETABLES)
324345LEAP_DEPS= leapseconds.awk leap-seconds.list
325346DATA= $( YDATA) $( NDATA) $( TABDATA) \
326347 $( LEAP_DEPS) yearistype.sh
327- WEB_PAGES= tz-art.htm tz-link.htm
328348AWK_SCRIPTS= checktab.awk leapseconds.awk
329- MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
330- $(WEB_PAGES) $(AWK_SCRIPTS) workman.sh \
331- zoneinfo2tdf.pl
349+ MISC= $( AWK_SCRIPTS) workman.sh zoneinfo2tdf.pl
332350ENCHILADA= $( COMMON) $( DOCS) $( SOURCES) $( DATA) $( MISC)
333351
334352# And for the benefit of csh users on systems that assume the user
@@ -347,7 +365,7 @@ install: all $(DATA) $(REDO) $(MANS)
347365 $( DESTDIR) $( MANDIR) /man8
348366 $( ZIC) -y $( YEARISTYPE) \
349367 -d $( DESTDIR) $( TZDIR) -l $( LOCALTIME) -p $( POSIXRULES)
350- cp -f iso3166.tab zone.tab $(DESTDIR)$(TZDIR)/.
368+ cp -f iso3166.tab $( ZONETABLES ) $( DESTDIR) $( TZDIR) /.
351369 cp tzselect zic zdump $( DESTDIR) $( ETCDIR) /.
352370 cp libtz.a $( DESTDIR) $( LIBDIR) /.
353371 $( RANLIB) $( DESTDIR) $( LIBDIR) /libtz.a
@@ -434,10 +452,22 @@ tzselect: tzselect.ksh
434452check: check_character_set check_tables check_web
435453
436454check_character_set: $( ENCHILADA)
437- sharp=' #' ; ! grep -n $( INVALID_CHAR) $( ENCHILADA)
438-
439- check_tables: checktab.awk $( PRIMARY_YDATA)
440- $( AWK) -f checktab.awk $( PRIMARY_YDATA)
455+ LC_ALL=en_US.utf8 && export LC_ALL && \
456+ sharp=' #' && \
457+ ! grep -Env $( SAFE_LINE) $( MANS) date.1 $( MANTXTS) \
458+ $( MISC) $( SOURCES) $( WEB_PAGES) && \
459+ ! grep -Env $( SAFE_SHARP_LINE) $( YDATA) $( NDATA) iso3166.tab \
460+ zone.tab leapseconds $( LEAP_DEPS) yearistype.sh && \
461+ test $$ (grep -Ecv $( SAFE_SHARP_LINE) Makefile) -eq 1 && \
462+ ! grep -Env $( NONSYM_LINE) README NEWS Theory $( MANS) date.1 \
463+ zone1970.tab && \
464+ ! grep -Env $( VALID_LINE) $( ENCHILADA)
465+
466+ check_tables: checktab.awk $( PRIMARY_YDATA) $( ZONETABLES)
467+ for tab in $( ZONETABLES) ; do \
468+ $( AWK) -f checktab.awk -v zone_table=$$ tab $( PRIMARY_YDATA) \
469+ || exit ; \
470+ done
441471
442472check_web: $( WEB_PAGES)
443473 $( VALIDATE_ENV) $( VALIDATE) $( VALIDATE_FLAGS) $( WEB_PAGES)
@@ -516,7 +546,7 @@ check_public: $(ENCHILADA)
516546# Check that the code works under various alternative
517547# implementations of time_t.
518548check_time_t_alternatives:
519- zones= ` $(AWK ) '/^[^# ]/ { print $$3 }' <zone .tab` && \
549+ zones= ` $(AWK ) '/^[^# ]/ { print $$3 }' <zone1970 .tab` && \
520550 for type in $(TIME_T_ALTERNATIVES); do \
521551 mkdir -p tzpublic/$$type && \
522552 make clean_misc && \
@@ -585,3 +615,10 @@ zdump.o: version.h
585615zic.o : private.h tzfile.h version.h
586616
587617.KEEP_STATE :
618+
619+ .PHONY : ALL INSTALL all
620+ .PHONY : check check_character_set check_public check_tables
621+ .PHONY : check_time_t_alternatives check_web clean clean_misc
622+ .PHONY : install maintainer-clean names posix_only posix_right
623+ .PHONY : public right_only right_posix signatures tarballs typecheck
624+ .PHONY : zonenames zones
0 commit comments