Deleted Added
sdiff udiff text old ( 330568 ) new ( 331986 )
full compact
1# This file is in the public domain, so clarified as of
2# 2009-05-17 by Arthur David Olson.
3
4# Package name for the code distribution.
5PACKAGE= tzcode
6
7# Version number for the distribution, overridden in the 'tarballs' rule below.
8VERSION= unknown
9
10# Email address for bug reports.
11BUGEMAIL= tz@iana.org
12
13# Change the line below for your time zone (after finding the zone you want in
14# the time zone files, or adding it to a time zone file).
15# Alternately, if you discover you've got the wrong time zone, you can just
16# zic -l rightzone
17# to correct things.
18# Use the command
19# make zonenames
20# to get a list of the values you can use for LOCALTIME.
21
22LOCALTIME= GMT
23
24# If you want something other than Eastern United States time as a template
25# for handling POSIX-style time zone environment variables,
26# change the line below (after finding the zone you want in the
27# time zone files, or adding it to a time zone file).
28# (When a POSIX-style environment variable is handled, the rules in the
29# template file are used to determine "spring forward" and "fall back" days and
30# times; the environment variable itself specifies UT offsets of standard and
31# summer time.)
32# Alternately, if you discover you've got the wrong time zone, you can just
33# zic -p rightzone
34# to correct things.
35# Use the command
36# make zonenames
37# to get a list of the values you can use for POSIXRULES.
38# If you want POSIX compatibility, use "America/New_York".
39

--- 144 unchanged lines hidden (view full) ---

184# localtime_rz can make zdump significantly faster, but is nonstandard.
185# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
186# functions like 'link' or variables like 'tzname' required by POSIX
187# -DHAVE_SNPRINTF=0 if your system lacks the snprintf function
188# -DHAVE_STDBOOL_H if you have a non-C99 compiler with <stdbool.h>
189# -DHAVE_STDINT_H if you have a non-C99 compiler with <stdint.h>
190# -DHAVE_STRFTIME_L if <time.h> declares locale_t and strftime_l
191# -DHAVE_STRDUP=0 if your system lacks the strdup function
192# -DHAVE_SYMLINK=0 if your system lacks the symlink function
193# -DHAVE_SYS_STAT_H=0 if your compiler lacks a <sys/stat.h>
194# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a <sys/wait.h>
195# -DHAVE_TZSET=0 if your system lacks a tzset function
196# -DHAVE_UNISTD_H=0 if your compiler lacks a <unistd.h>
197# -Dlocale_t=XXX if your system uses XXX instead of locale_t
198# -Dssize_t=long on hosts like MS-Windows that lack ssize_t
199# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires;
200# not needed by the main-program tz code, which is single-threaded.
201# Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
202# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
203# This is intended for internal use only; it mangles external names.
204# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
205# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
206# the default is system-supplied, typically "/usr/lib/locale"

--- 182 unchanged lines hidden (view full) ---

389# TAB_CHAR is a single tab character, in single quotes.
390TAB_CHAR= ' '
391SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@'
392SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
393SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~'
394SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
395SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]'
396
397# OK_CHAR matches any character allowed in the distributed files.
398# This is the same as SAFE_CHAR, except that multibyte letters are
399# also allowed so that commentary can contain people's names and quote
400# non-English sources. For non-letters the sources are limited to
401# ASCII renderings for the convenience of maintainers whose text editors
402# mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
403OK_CHAR= '[][:alpha:]'$(SAFE_CHARSET)'-]'
404
405# SAFE_LINE matches a line of safe characters.
406# SAFE_SHARP_LINE is similar, except any OK character can follow '#';
407# this is so that comments can contain non-ASCII characters.
408# OK_LINE matches a line of OK characters.
409SAFE_LINE= '^'$(SAFE_CHAR)'*$$'
410SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
411OK_LINE= '^'$(OK_CHAR)'*$$'

--- 45 unchanged lines hidden (view full) ---

457 europe northamerica southamerica
458YDATA= $(PRIMARY_YDATA) etcetera
459NDATA= systemv factory
460TDATA_TO_CHECK= $(YDATA) $(NDATA) backward pacificnew
461TDATA= $(YDATA) $(NDATA) $(BACKWARD)
462ZONETABLES= zone1970.tab zone.tab
463TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
464LEAP_DEPS= leapseconds.awk leap-seconds.list
465TZDATA_ZI_DEPS= zishrink.awk version $(TDATA) $(PACKRATDATA)
466DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
467 leapseconds yearistype.sh $(ZONETABLES)
468AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk zishrink.awk
469MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl
470TZS_YEAR= 2050
471TZS= to$(TZS_YEAR).tzs
472TZS_NEW= to$(TZS_YEAR)new.tzs
473TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \
474 private.h tzfile.h zdump.c zic.c
475ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdata.zi
476

--- 17 unchanged lines hidden (view full) ---

494 zdump.8 zdump.c zic.8 zic.c \
495 zone.tab zone1970.tab zoneinfo2tdf.pl
496
497# And for the benefit of csh users on systems that assume the user
498# shell should be used to handle commands in Makefiles. . .
499
500SHELL= /bin/sh
501
502all: tzselect yearistype zic zdump libtz.a $(TABDATA)
503
504ALL: all date $(ENCHILADA)
505
506install: all $(DATA) $(REDO) $(MANS)
507 mkdir -p '$(DESTDIR)$(BINDIR)' \
508 '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \
509 '$(DESTDIR)$(LIBDIR)' \
510 '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \

--- 18 unchanged lines hidden (view full) ---

529version: $(VERSION_DEPS)
530 { (type git) >/dev/null 2>&1 && \
531 V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
532 --abbrev=7 --dirty` || \
533 V='$(VERSION)'; } && \
534 printf '%s\n' "$$V" >$@.out
535 mv $@.out $@
536
537# This file can be tailored by setting BACKWARD, PACKRATDATA, etc.
538tzdata.zi: $(TZDATA_ZI_DEPS)
539 version=`sed 1q version` && \
540 LC_ALL=C $(AWK) -v version="$$version" -f zishrink.awk \
541 $(TDATA) $(PACKRATDATA) >$@.out
542 mv $@.out $@
543
544version.h: version
545 VERSION=`cat version` && printf '%s\n' \
546 'static char const PKGVERSION[]="($(PACKAGE)) ";' \
547 "static char const TZVERSION[]=\"$$VERSION\";" \
548 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
549 >$@.out

--- 59 unchanged lines hidden (view full) ---

609
610# This obsolescent rule is present for backwards compatibility with
611# tz releases 2014g through 2015g. It should go away eventually.
612posix_packrat:
613 $(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
614
615zones: $(REDO)
616
617$(TZS_NEW): tzdata.zi zdump zic
618 mkdir -p tzs.dir
619 $(zic) -d tzs.dir tzdata.zi
620 $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \
621 tzdata.zi | LC_ALL=C sort >$@.out
622 wd=`pwd` && \
623 zones=`$(AWK) -v wd="$$wd" \
624 '/^Z/{print wd "/tzs.dir/" $$2}' tzdata.zi \
625 | LC_ALL=C sort` && \
626 ./zdump -i -c $(TZS_YEAR) $$zones >>$@.out
627 sed 's,^TZ=".*tzs\.dir/,TZ=",' $@.out >$@.sed.out
628 rm -fr tzs.dir $@.out
629 mv $@.sed.out $@
630
631# If $(TZS) does not already exist (e.g., old-format tarballs), create it.
632# If it exists but 'make check_tzs' fails, a maintainer should inspect the
633# failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
634$(TZS):
635 $(MAKE) force_tzs
636
637force_tzs: $(TZS_NEW)

--- 26 unchanged lines hidden (view full) ---

664check_character_set: $(ENCHILADA)
665 test ! '$(UTF8_LOCALE)' || \
666 ! printf 'A\304\200B\n' | \
667 LC_ALL='$(UTF8_LOCALE)' grep -q '^A.B$$' >/dev/null 2>&1 || { \
668 LC_ALL='$(UTF8_LOCALE)' && export LC_ALL && \
669 sharp='#' && \
670 ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
671 $(MISC) $(SOURCES) $(WEB_PAGES) \
672 CONTRIBUTING LICENSE Makefile README \
673 version tzdata.zi && \
674 ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
675 leapseconds yearistype.sh zone.tab && \
676 ! grep -Env $(OK_LINE) $(ENCHILADA); \
677 }
678
679check_white_space: $(ENCHILADA)
680 patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
681 ! grep -En "$$pat" $(ENCHILADA)

--- 15 unchanged lines hidden (view full) ---

697 $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
698 $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
699 $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
700 $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
701 LC_ALL=C sort -c
702 $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
703 LC_ALL=C sort -cu
704
705check_links: checklinks.awk $(TDATA_TO_CHECK)
706 $(AWK) -f checklinks.awk $(TDATA_TO_CHECK)
707 $(AWK) -f checklinks.awk tzdata.zi
708
709check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
710 for tab in $(ZONETABLES); do \
711 $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
712 || exit; \
713 done
714
715check_tzs: $(TZS) $(TZS_NEW)
716 diff -u $(TZS) $(TZS_NEW)
717
718# This checks only the HTML 4.01 strict page.
719# To check the the other pages, use <https://validator.w3.org/>.
720check_web: tz-how-to.html
721 $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
722
723# Check that tzdata.zi generates the same binary data that its sources do.
724check_zishrink: tzdata.zi zic leapseconds $(PACKRATDATA) $(TDATA)
725 for type in posix right; do \
726 mkdir -p time_t.dir/$$type time_t.dir/$$type-shrunk && \
727 case $$type in \
728 right) leap='-L leapseconds';; \
729 *) leap=;; \
730 esac && \
731 $(ZIC) $$leap -d time_t.dir/$$type $(TDATA) && \
732 $(AWK) '/^Rule/' $(TDATA) | \
733 $(ZIC) $$leap -d time_t.dir/$$type - $(PACKRATDATA) && \
734 $(ZIC) $$leap -d time_t.dir/$$type-shrunk tzdata.zi && \
735 diff -r time_t.dir/$$type time_t.dir/$$type-shrunk || exit; \
736 done
737 rm -fr time_t.dir
738
739clean_misc:
740 rm -f core *.o *.out \
741 date tzselect version.h zdump zic yearistype libtz.a
742clean: clean_misc
743 rm -fr *.dir tzdata.zi tzdb-*/ $(TZS_NEW)
744
745maintainer-clean: clean
746 @echo 'This command is intended for maintainers to use; it'
747 @echo 'deletes files that may need special tools to rebuild.'
748 rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
749
750names:
751 @echo $(ENCHILADA)

--- 99 unchanged lines hidden (view full) ---

851 || exit; \
852 done
853 rm -fr time_t.dir
854
855tarballs traditional_tarballs signatures traditional_signatures: version
856 VERSION=`cat version` && \
857 $(MAKE) VERSION="$$VERSION" $@_version
858
859tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
860traditional_tarballs_version: \
861 tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
862signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
863traditional_signatures_version: \
864 tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
865
866tzcode$(VERSION).tar.gz: set-timestamps.out

--- 45 unchanged lines hidden (view full) ---

912localtime.o: private.h tzfile.h
913strftime.o: private.h tzfile.h
914zdump.o: version.h
915zic.o: private.h tzfile.h version.h
916
917.KEEP_STATE:
918
919.PHONY: ALL INSTALL all
920.PHONY: check check_character_set check_links
921.PHONY: check_public check_sorted check_tables
922.PHONY: check_time_t_alternatives check_tzs check_web check_white_space
923.PHONY: check_zishrink
924.PHONY: clean clean_misc force_tzs
925.PHONY: install install_data maintainer-clean names
926.PHONY: posix_only posix_packrat posix_right
927.PHONY: public right_only right_posix signatures signatures_version
928.PHONY: tarballs tarballs_version typecheck
929.PHONY: zonenames zones