Home | History | Annotate | Line # | Download | only in time
Makefile revision 1.32.2.1
      1       1.1   mlelstv # This file is in the public domain, so clarified as of
      2       1.1   mlelstv # 2009-05-17 by Arthur David Olson.
      3       1.1   mlelstv 
      4      1.10  christos # Package name for the code distribution.
      5      1.10  christos PACKAGE=	tzcode
      6      1.10  christos 
      7  1.32.2.1  pgoyette # Version number for the distribution, overridden in the 'tarballs' rule below.
      8  1.32.2.1  pgoyette VERSION=	unknown
      9       1.9  christos 
     10       1.9  christos # Email address for bug reports.
     11       1.9  christos BUGEMAIL=	tz@iana.org
     12       1.6  christos 
     13       1.1   mlelstv # Change the line below for your time zone (after finding the zone you want in
     14       1.1   mlelstv # the time zone files, or adding it to a time zone file).
     15       1.1   mlelstv # Alternately, if you discover you've got the wrong time zone, you can just
     16       1.1   mlelstv #	zic -l rightzone
     17       1.1   mlelstv # to correct things.
     18       1.1   mlelstv # Use the command
     19       1.1   mlelstv #	make zonenames
     20       1.1   mlelstv # to get a list of the values you can use for LOCALTIME.
     21       1.1   mlelstv 
     22       1.4  christos LOCALTIME=	GMT
     23       1.1   mlelstv 
     24       1.1   mlelstv # If you want something other than Eastern United States time as a template
     25       1.1   mlelstv # for handling POSIX-style time zone environment variables,
     26       1.1   mlelstv # change the line below (after finding the zone you want in the
     27       1.1   mlelstv # time zone files, or adding it to a time zone file).
     28       1.1   mlelstv # (When a POSIX-style environment variable is handled, the rules in the
     29       1.1   mlelstv # template file are used to determine "spring forward" and "fall back" days and
     30      1.15  christos # times; the environment variable itself specifies UT offsets of standard and
     31       1.1   mlelstv # summer time.)
     32       1.1   mlelstv # Alternately, if you discover you've got the wrong time zone, you can just
     33       1.1   mlelstv #	zic -p rightzone
     34       1.1   mlelstv # to correct things.
     35       1.1   mlelstv # Use the command
     36       1.1   mlelstv #	make zonenames
     37       1.1   mlelstv # to get a list of the values you can use for POSIXRULES.
     38       1.1   mlelstv # If you want POSIX compatibility, use "America/New_York".
     39       1.1   mlelstv 
     40       1.1   mlelstv POSIXRULES=	America/New_York
     41       1.1   mlelstv 
     42       1.1   mlelstv # Also see TZDEFRULESTRING below, which takes effect only
     43       1.1   mlelstv # if the time zone files cannot be accessed.
     44       1.1   mlelstv 
     45       1.1   mlelstv # Everything gets put in subdirectories of. . .
     46       1.1   mlelstv 
     47       1.1   mlelstv TOPDIR=		/usr/local
     48       1.1   mlelstv 
     49       1.1   mlelstv # "Compiled" time zone information is placed in the "TZDIR" directory
     50       1.1   mlelstv # (and subdirectories).
     51       1.1   mlelstv # Use an absolute path name for TZDIR unless you're just testing the software.
     52       1.1   mlelstv 
     53      1.15  christos TZDIR_BASENAME=	zoneinfo
     54      1.15  christos TZDIR=		$(TOPDIR)/etc/$(TZDIR_BASENAME)
     55       1.1   mlelstv 
     56      1.14  christos # Types to try, as an alternative to time_t.  int64_t should be first.
     57      1.14  christos TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
     58      1.14  christos 
     59       1.1   mlelstv # The "tzselect", "zic", and "zdump" commands get installed in. . .
     60       1.1   mlelstv 
     61       1.1   mlelstv ETCDIR=		$(TOPDIR)/etc
     62       1.1   mlelstv 
     63       1.1   mlelstv # If you "make INSTALL", the "date" command gets installed in. . .
     64       1.1   mlelstv 
     65       1.1   mlelstv BINDIR=		$(TOPDIR)/bin
     66       1.1   mlelstv 
     67       1.1   mlelstv # Manual pages go in subdirectories of. . .
     68       1.1   mlelstv 
     69       1.1   mlelstv MANDIR=		$(TOPDIR)/man
     70       1.1   mlelstv 
     71       1.1   mlelstv # Library functions are put in an archive in LIBDIR.
     72       1.1   mlelstv 
     73       1.1   mlelstv LIBDIR=		$(TOPDIR)/lib
     74       1.1   mlelstv 
     75       1.1   mlelstv # If you always want time values interpreted as "seconds since the epoch
     76       1.1   mlelstv # (not counting leap seconds)", use
     77       1.1   mlelstv #	REDO=		posix_only
     78       1.1   mlelstv # below.  If you always want right time values interpreted as "seconds since
     79       1.1   mlelstv # the epoch" (counting leap seconds)", use
     80       1.1   mlelstv #	REDO=		right_only
     81       1.1   mlelstv # below.  If you want both sets of data available, with leap seconds not
     82       1.1   mlelstv # counted normally, use
     83       1.1   mlelstv #	REDO=		posix_right
     84       1.1   mlelstv # below.  If you want both sets of data available, with leap seconds counted
     85       1.1   mlelstv # normally, use
     86       1.1   mlelstv #	REDO=		right_posix
     87      1.32  christos # below.  POSIX mandates that leap seconds not be counted; for compatibility
     88      1.32  christos # with it, use "posix_only" or "posix_right".
     89       1.1   mlelstv 
     90       1.1   mlelstv REDO=		posix_right
     91       1.1   mlelstv 
     92      1.32  christos # If you want out-of-scope and often-wrong data from the file 'backzone', use
     93      1.32  christos #	PACKRATDATA=	backzone
     94      1.32  christos # To omit this data, use
     95      1.32  christos #	PACKRATDATA=
     96      1.32  christos 
     97      1.32  christos PACKRATDATA=
     98      1.32  christos 
     99       1.1   mlelstv # Since "." may not be in PATH...
    100       1.1   mlelstv 
    101       1.1   mlelstv YEARISTYPE=	./yearistype
    102       1.1   mlelstv 
    103       1.1   mlelstv # Non-default libraries needed to link.
    104       1.1   mlelstv LDLIBS=
    105       1.1   mlelstv 
    106       1.1   mlelstv # Add the following to the end of the "CFLAGS=" line as needed.
    107      1.19  christos #  -DBIG_BANG=-9999999LL if the Big Bang occurred at time -9999999 (see zic.c)
    108      1.32  christos #  -DHAVE_DECL_ASCTIME_R=0 if <time.h> does not declare asctime_r
    109      1.32  christos #  -DHAVE_DIRECT_H if mkdir needs <direct.h> (MS-Windows)
    110      1.14  christos #  -DHAVE_DOS_FILE_NAMES if file names have drive specifiers etc. (MS-DOS)
    111  1.32.2.1  pgoyette #  -DHAVE_GETTEXT=1 if 'gettext' works (e.g., GNU/Linux, FreeBSD, Solaris)
    112       1.1   mlelstv #  -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
    113  1.32.2.1  pgoyette #	ctime_r and asctime_r incompatibly with the POSIX standard
    114  1.32.2.1  pgoyette #	(Solaris when _POSIX_PTHREAD_SEMANTICS is not defined).
    115      1.14  christos #  -DHAVE_INTTYPES_H=1 if you have a pre-C99 compiler with "inttypes.h"
    116      1.16  christos #  -DHAVE_LINK=0 if your system lacks a link function
    117      1.23  christos #  -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function
    118      1.23  christos #  -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz
    119      1.23  christos #	This defaults to 1 if a working localtime_rz seems to be available.
    120      1.23  christos #	localtime_rz can make zdump significantly faster, but is nonstandard.
    121      1.32  christos #  -DHAVE_POSIX_DECLS=0 if your system's include files do not declare
    122      1.32  christos #	functions like 'link' or variables like 'tzname' required by POSIX
    123       1.1   mlelstv #  -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h"
    124      1.23  christos #  -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l
    125      1.23  christos #	This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise.
    126      1.28  christos #  -DHAVE_STRDUP=0 if your system lacks the strdup function
    127       1.1   mlelstv #  -DHAVE_SYMLINK=0 if your system lacks the symlink function
    128       1.1   mlelstv #  -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
    129       1.1   mlelstv #  -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
    130      1.23  christos #  -DHAVE_TZSET=0 if your system lacks a tzset function
    131       1.1   mlelstv #  -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
    132      1.14  christos #  -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
    133      1.14  christos #	if you do not want run time warnings about formats that may cause
    134      1.14  christos #	year 2000 grief
    135      1.24  christos #  -Dssize_t=long on ancient hosts that lack ssize_t
    136      1.23  christos #  -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires;
    137      1.23  christos #	not needed by the main-program tz code, which is single-threaded.
    138      1.23  christos #	Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
    139      1.14  christos #  -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t
    140       1.1   mlelstv #  -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
    141      1.22  christos #  -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
    142       1.1   mlelstv #	the default is system-supplied, typically "/usr/lib/locale"
    143      1.14  christos #  -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
    144      1.23  christos #  -DUNINIT_TRAP=1 if reading uninitialized storage can cause problems
    145      1.23  christos #	other than simply getting garbage data
    146      1.23  christos #  -DUSE_LTZ=0 to build zdump with the system time zone library
    147      1.23  christos #	Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
    148      1.11  christos #  -DNO_ERROR_IN_DST_GAP=1
    149      1.11  christos #	if you want mktime() not to return an error in the DST gap.
    150       1.1   mlelstv #  -DZIC_MAX_ABBR_LEN_WO_WARN=3
    151       1.1   mlelstv #	(or some other number) to set the maximum time zone abbreviation length
    152       1.1   mlelstv #	that zic will accept without a warning (the default is 6)
    153      1.30  christos #  $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking
    154       1.7  christos GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
    155       1.7  christos 	-Wall -Wextra \
    156      1.28  christos 	-Wbad-function-cast -Wcast-align -Wdate-time \
    157      1.22  christos 	-Wdeclaration-after-statement \
    158      1.28  christos 	-Wdouble-promotion \
    159      1.22  christos 	-Wformat=2 -Winit-self -Wjump-misses-init \
    160      1.28  christos 	-Wlogical-op -Wmissing-prototypes -Wnested-externs \
    161      1.28  christos 	-Wold-style-definition -Woverlength-strings -Wpointer-arith \
    162       1.7  christos 	-Wshadow -Wstrict-prototypes -Wsuggest-attribute=const \
    163      1.22  christos 	-Wsuggest-attribute=format -Wsuggest-attribute=noreturn \
    164      1.22  christos 	-Wsuggest-attribute=pure -Wtrampolines \
    165      1.28  christos 	-Wunused -Wwrite-strings \
    166      1.28  christos 	-Wno-address -Wno-format-nonliteral -Wno-sign-compare \
    167      1.28  christos 	-Wno-type-limits -Wno-unused-parameter
    168       1.1   mlelstv #
    169       1.1   mlelstv # If you want to use System V compatibility code, add
    170       1.1   mlelstv #	-DUSG_COMPAT
    171       1.1   mlelstv # to the end of the "CFLAGS=" line.  This arrange for "timezone" and "daylight"
    172       1.1   mlelstv # variables to be kept up-to-date by the time conversion functions.  Neither
    173       1.1   mlelstv # "timezone" nor "daylight" is described in X3J11's work.
    174       1.1   mlelstv #
    175       1.1   mlelstv # If your system has a "GMT offset" field in its "struct tm"s
    176       1.1   mlelstv # (or if you decide to add such a field in your system's "time.h" file),
    177       1.1   mlelstv # add the name to a define such as
    178       1.1   mlelstv #	-DTM_GMTOFF=tm_gmtoff
    179      1.23  christos # to the end of the "CFLAGS=" line.  If not defined, the code attempts to
    180      1.23  christos # guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
    181      1.23  christos # Similarly, if your system has a "zone abbreviation" field, define
    182       1.1   mlelstv #	-DTM_ZONE=tm_zone
    183      1.23  christos # and define NO_TM_ZONE to suppress any guessing.  These two fields are not
    184      1.23  christos # required by POSIX, but are widely available on GNU/Linux and BSD systems.
    185       1.1   mlelstv #
    186       1.1   mlelstv # If you want functions that were inspired by early versions of X3J11's work,
    187       1.1   mlelstv # add
    188       1.1   mlelstv #	-DSTD_INSPIRED
    189       1.1   mlelstv # to the end of the "CFLAGS=" line.  This arranges for the functions
    190       1.1   mlelstv # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
    191       1.1   mlelstv # "posix2time", and "time2posix" to be added to the time conversion library.
    192       1.1   mlelstv # "tzsetwall" is like "tzset" except that it arranges for local wall clock
    193       1.1   mlelstv # time (rather than the time specified in the TZ environment variable)
    194       1.1   mlelstv # to be used.
    195       1.1   mlelstv # "offtime" is like "gmtime" except that it accepts a second (long) argument
    196       1.1   mlelstv # that gives an offset to add to the time_t when converting it.
    197       1.1   mlelstv # "timelocal" is equivalent to "mktime".
    198       1.1   mlelstv # "timegm" is like "timelocal" except that it turns a struct tm into
    199      1.15  christos # a time_t using UT (rather than local time as "timelocal" does).
    200       1.1   mlelstv # "timeoff" is like "timegm" except that it accepts a second (long) argument
    201       1.1   mlelstv # that gives an offset to use when converting to a time_t.
    202       1.1   mlelstv # "posix2time" and "time2posix" are described in an included manual page.
    203       1.1   mlelstv # X3J11's work does not describe any of these functions.
    204       1.1   mlelstv # Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
    205       1.1   mlelstv # These functions may well disappear in future releases of the time
    206       1.1   mlelstv # conversion package.
    207       1.1   mlelstv #
    208      1.23  christos # If you don't want functions that were inspired by NetBSD, add
    209      1.23  christos #	-DNETBSD_INSPIRED=0
    210      1.23  christos # to the end of the "CFLAGS=" line.  Otherwise, the functions
    211      1.23  christos # "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the
    212      1.23  christos # time library, and if STD_INSPIRED is also defined the functions
    213      1.23  christos # "posix2time_z" and "time2posix_z" are added as well.
    214      1.23  christos # The functions ending in "_z" (or "_rz") are like their unsuffixed
    215      1.23  christos # (or suffixed-by-"_r") counterparts, except with an extra first
    216      1.23  christos # argument of opaque type timezone_t that specifies the time zone.
    217      1.23  christos # "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
    218      1.23  christos #
    219       1.1   mlelstv # If you want to allocate state structures in localtime, add
    220       1.1   mlelstv #	-DALL_STATE
    221       1.1   mlelstv # to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
    222       1.1   mlelstv #
    223       1.1   mlelstv # If you want an "altzone" variable (a la System V Release 3.1), add
    224       1.1   mlelstv #	-DALTZONE
    225       1.1   mlelstv # to the end of the "CFLAGS=" line.
    226       1.1   mlelstv # This variable is not described in X3J11's work.
    227       1.1   mlelstv #
    228       1.1   mlelstv # NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
    229       1.1   mlelstv # out by the National Institute of Standards and Technology
    230       1.1   mlelstv # which claims to test C and Posix conformance.  If you want to pass PCTS, add
    231       1.1   mlelstv #	-DPCTS
    232       1.1   mlelstv # to the end of the "CFLAGS=" line.
    233       1.1   mlelstv #
    234       1.1   mlelstv # If you want strict compliance with XPG4 as of 1994-04-09, add
    235       1.1   mlelstv #	-DXPG4_1994_04_09
    236       1.1   mlelstv # to the end of the "CFLAGS=" line.  This causes "strftime" to always return
    237       1.1   mlelstv # 53 as a week number (rather than 52 or 53) for those days in January that
    238       1.1   mlelstv # before the first Monday in January when a "%V" format is used and January 1
    239       1.1   mlelstv # falls on a Friday, Saturday, or Sunday.
    240       1.1   mlelstv 
    241       1.1   mlelstv CFLAGS=
    242       1.1   mlelstv 
    243       1.9  christos # Linker flags.  Default to $(LFLAGS) for backwards compatibility
    244  1.32.2.1  pgoyette # to release 2012h and earlier.
    245       1.9  christos 
    246       1.9  christos LDFLAGS=	$(LFLAGS)
    247       1.1   mlelstv 
    248      1.32  christos # For leap seconds, this Makefile uses LEAPSECONDS='-L leapseconds' in
    249      1.32  christos # submake command lines.  The default is no leap seconds.
    250      1.32  christos 
    251      1.32  christos LEAPSECONDS=
    252      1.32  christos 
    253      1.32  christos # The zic command and its arguments.
    254      1.32  christos 
    255       1.1   mlelstv zic=		./zic
    256       1.1   mlelstv ZIC=		$(zic) $(ZFLAGS)
    257       1.1   mlelstv 
    258      1.15  christos ZFLAGS=
    259      1.15  christos 
    260  1.32.2.1  pgoyette # How to use zic to install tz binary files.
    261      1.32  christos 
    262      1.32  christos ZIC_INSTALL=	$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
    263      1.32  christos 
    264      1.22  christos # The name of a Posix-compliant 'awk' on your system.
    265       1.9  christos AWK=		awk
    266       1.9  christos 
    267      1.16  christos # The full path name of a Posix-compliant shell, preferably one that supports
    268      1.16  christos # the Korn shell's 'select' statement as an extension.
    269      1.16  christos # These days, Bash is the most popular.
    270      1.16  christos # It should be OK to set this to /bin/sh, on platforms where /bin/sh
    271      1.16  christos # lacks 'select' or doesn't completely conform to Posix, but /bin/bash
    272      1.16  christos # is typically nicer if it works.
    273       1.9  christos KSHELL=		/bin/bash
    274       1.1   mlelstv 
    275      1.18  christos # The path where SGML DTDs are kept and the catalog file(s) to use when
    276  1.32.2.1  pgoyette # validating.  The default should work on both Debian and Red Hat.
    277      1.10  christos SGML_TOPDIR= /usr
    278       1.9  christos SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
    279       1.9  christos SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
    280      1.18  christos SGML_CATALOG_FILES= \
    281  1.32.2.1  pgoyette   $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
    282       1.1   mlelstv 
    283       1.1   mlelstv # The name, arguments and environment of a program to validate your web pages.
    284  1.32.2.1  pgoyette # See <http://openjade.sourceforge.net/doc/> for a validator, and
    285  1.32.2.1  pgoyette # <https://validator.w3.org/source/> for a validation library.
    286       1.1   mlelstv VALIDATE = nsgmls
    287       1.1   mlelstv VALIDATE_FLAGS = -s -B -wall -wno-unused-param
    288       1.1   mlelstv VALIDATE_ENV = \
    289       1.1   mlelstv   SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
    290       1.1   mlelstv   SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
    291       1.1   mlelstv   SP_CHARSET_FIXED=YES \
    292       1.1   mlelstv   SP_ENCODING=UTF-8
    293       1.1   mlelstv 
    294      1.23  christos # This expensive test requires USE_LTZ.
    295      1.23  christos # To suppress it, define this macro to be empty.
    296      1.23  christos CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives
    297      1.23  christos 
    298      1.22  christos # SAFE_CHAR is a regular expression that matches a safe character.
    299      1.22  christos # Some parts of this distribution are limited to safe characters;
    300      1.22  christos # others can use any UTF-8 character.
    301      1.22  christos # For now, the safe characters are a safe subset of ASCII.
    302       1.9  christos # The caller must set the shell variable 'sharp' to the character '#',
    303       1.9  christos # since Makefile macros cannot contain '#'.
    304       1.9  christos # TAB_CHAR is a single tab character, in single quotes.
    305       1.9  christos TAB_CHAR=	'	'
    306      1.22  christos SAFE_CHARSET1=	$(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@'
    307      1.22  christos SAFE_CHARSET2=	'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`'
    308      1.22  christos SAFE_CHARSET3=	'abcdefghijklmnopqrstuvwxyz{|}~'
    309      1.29  christos SAFE_CHARSET=	$(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3)
    310      1.29  christos SAFE_CHAR=	'[]'$(SAFE_CHARSET)'-]'
    311      1.29  christos 
    312      1.29  christos # OK_CHAR matches any character allowed in the distributed files.
    313      1.29  christos # This is the same as SAFE_CHAR, except that multibyte letters are
    314      1.29  christos # also allowed so that commentary can contain people's names and quote
    315      1.29  christos # non-English sources.  For non-letters the sources are limited to
    316      1.22  christos # ASCII renderings for the convenience of maintainers whose text editors
    317      1.22  christos # mishandle UTF-8 by default (e.g., XEmacs 21.4.22).
    318      1.29  christos OK_CHAR=	'[][:alpha:]'$(SAFE_CHARSET)'-]'
    319      1.22  christos 
    320      1.22  christos # SAFE_LINE matches a line of safe characters.
    321      1.29  christos # SAFE_SHARP_LINE is similar, except any OK character can follow '#';
    322      1.22  christos # this is so that comments can contain non-ASCII characters.
    323      1.29  christos # OK_LINE matches a line of OK characters.
    324      1.22  christos SAFE_LINE=	'^'$(SAFE_CHAR)'*$$'
    325      1.29  christos SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$'
    326      1.29  christos OK_LINE=	'^'$(OK_CHAR)'*$$'
    327       1.9  christos 
    328       1.6  christos # Flags to give 'tar' when making a distribution.
    329       1.6  christos # Try to use flags appropriate for GNU tar.
    330  1.32.2.1  pgoyette GNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w --sort=name
    331       1.6  christos TARFLAGS=	`if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \
    332       1.6  christos 		 then echo $(GNUTARFLAGS); \
    333       1.6  christos 		 else :; \
    334       1.6  christos 		 fi`
    335       1.6  christos 
    336       1.6  christos # Flags to give 'gzip' when making a distribution.
    337      1.21       apb GZIPFLAGS=	-9 ${GZIP_N_FLAG}
    338       1.6  christos 
    339       1.1   mlelstv ###############################################################################
    340       1.1   mlelstv 
    341      1.29  christos #MAKE=		make
    342      1.29  christos 
    343       1.1   mlelstv cc=		cc
    344       1.1   mlelstv CC=		$(cc) -DTZDIR=\"$(TZDIR)\"
    345       1.1   mlelstv 
    346      1.16  christos AR=		ar
    347      1.16  christos 
    348      1.16  christos # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib.
    349      1.16  christos RANLIB=		:
    350      1.16  christos 
    351      1.28  christos TZCOBJS=	zic.o
    352      1.23  christos TZDOBJS=	zdump.o localtime.o asctime.o
    353       1.1   mlelstv DATEOBJS=	date.o localtime.o strftime.o asctime.o
    354       1.1   mlelstv LIBSRCS=	localtime.c asctime.c difftime.c
    355       1.1   mlelstv LIBOBJS=	localtime.o asctime.o difftime.o
    356       1.1   mlelstv HEADERS=	tzfile.h private.h
    357      1.28  christos NONLIBSRCS=	zic.c zdump.c
    358       1.1   mlelstv NEWUCBSRCS=	date.c strftime.c
    359      1.23  christos SOURCES=	$(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \
    360      1.23  christos 			tzselect.ksh workman.sh
    361       1.1   mlelstv MANS=		newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
    362       1.1   mlelstv 			tzfile.5 tzselect.8 zic.8 zdump.8
    363      1.16  christos MANTXTS=	newctime.3.txt newstrftime.3.txt newtzset.3.txt \
    364      1.16  christos 			time2posix.3.txt \
    365      1.16  christos 			tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \
    366      1.16  christos 			date.1.txt
    367  1.32.2.1  pgoyette COMMON=		CONTRIBUTING LICENSE Makefile NEWS README Theory version
    368      1.32  christos WEB_PAGES=	tz-art.htm tz-how-to.html tz-link.htm
    369      1.23  christos DOCS=		$(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
    370       1.1   mlelstv PRIMARY_YDATA=	africa antarctica asia australasia \
    371       1.1   mlelstv 		europe northamerica southamerica
    372       1.4  christos YDATA=		$(PRIMARY_YDATA) pacificnew etcetera backward
    373       1.4  christos NDATA=		systemv factory
    374      1.16  christos TDATA=		$(YDATA) $(NDATA)
    375      1.22  christos ZONETABLES=	zone1970.tab zone.tab
    376      1.22  christos TABDATA=	iso3166.tab leapseconds $(ZONETABLES)
    377      1.16  christos LEAP_DEPS=	leapseconds.awk leap-seconds.list
    378      1.23  christos DATA=		$(YDATA) $(NDATA) backzone $(TABDATA) \
    379      1.23  christos 			leap-seconds.list yearistype.sh
    380      1.26  christos AWK_SCRIPTS=	checklinks.awk checktab.awk leapseconds.awk
    381      1.23  christos MISC=		$(AWK_SCRIPTS) zoneinfo2tdf.pl
    382  1.32.2.1  pgoyette TZS_YEAR=	2050
    383  1.32.2.1  pgoyette TZS=		to$(TZS_YEAR).tzs
    384  1.32.2.1  pgoyette TZS_NEW=	to$(TZS_YEAR)new.tzs
    385  1.32.2.1  pgoyette TZS_DEPS=	$(PRIMARY_YDATA) asctime.c localtime.c \
    386  1.32.2.1  pgoyette 			private.h tzfile.h zdump.c zic.c
    387  1.32.2.1  pgoyette ENCHILADA=	$(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS)
    388  1.32.2.1  pgoyette 
    389  1.32.2.1  pgoyette # Consult these files when deciding whether to rebuild the 'version' file.
    390  1.32.2.1  pgoyette # This list is not the same as the output of 'git ls-files', since
    391  1.32.2.1  pgoyette # .gitignore is not distributed.
    392  1.32.2.1  pgoyette VERSION_DEPS= \
    393  1.32.2.1  pgoyette 		CONTRIBUTING LICENSE Makefile NEWS README Theory \
    394  1.32.2.1  pgoyette 		africa antarctica asctime.c asia australasia \
    395  1.32.2.1  pgoyette 		backward backzone \
    396  1.32.2.1  pgoyette 		checklinks.awk checktab.awk \
    397  1.32.2.1  pgoyette 		date.1 date.c difftime.c \
    398  1.32.2.1  pgoyette 		etcetera europe factory iso3166.tab \
    399  1.32.2.1  pgoyette 		leap-seconds.list leapseconds.awk localtime.c \
    400  1.32.2.1  pgoyette 		newctime.3 newstrftime.3 newtzset.3 northamerica \
    401  1.32.2.1  pgoyette 		pacificnew private.h \
    402  1.32.2.1  pgoyette 		southamerica strftime.c systemv \
    403  1.32.2.1  pgoyette 		time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \
    404  1.32.2.1  pgoyette 		tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
    405  1.32.2.1  pgoyette 		workman.sh yearistype.sh \
    406  1.32.2.1  pgoyette 		zdump.8 zdump.c zic.8 zic.c \
    407  1.32.2.1  pgoyette 		zone.tab zone1970.tab zoneinfo2tdf.pl
    408       1.1   mlelstv 
    409       1.1   mlelstv # And for the benefit of csh users on systems that assume the user
    410       1.1   mlelstv # shell should be used to handle commands in Makefiles. . .
    411       1.1   mlelstv 
    412       1.1   mlelstv SHELL=		/bin/sh
    413       1.1   mlelstv 
    414      1.32  christos all:		tzselect yearistype zic zdump libtz.a $(TABDATA)
    415       1.1   mlelstv 
    416      1.29  christos ALL:		all date $(ENCHILADA)
    417       1.1   mlelstv 
    418      1.16  christos install:	all $(DATA) $(REDO) $(MANS)
    419      1.16  christos 		mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
    420      1.16  christos 			$(DESTDIR)$(LIBDIR) \
    421      1.16  christos 			$(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
    422      1.16  christos 			$(DESTDIR)$(MANDIR)/man8
    423      1.32  christos 		$(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
    424      1.22  christos 		cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
    425      1.15  christos 		cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
    426      1.16  christos 		cp libtz.a $(DESTDIR)$(LIBDIR)/.
    427      1.16  christos 		$(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
    428      1.16  christos 		cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
    429      1.16  christos 		cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
    430      1.16  christos 		cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
    431       1.1   mlelstv 
    432       1.1   mlelstv INSTALL:	ALL install date.1
    433      1.16  christos 		mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
    434      1.15  christos 		cp date $(DESTDIR)$(BINDIR)/.
    435      1.16  christos 		cp -f date.1 $(DESTDIR)$(MANDIR)/man1/.
    436       1.1   mlelstv 
    437  1.32.2.1  pgoyette version:	$(VERSION_DEPS)
    438  1.32.2.1  pgoyette 		{ (type git) >/dev/null 2>&1 && \
    439  1.32.2.1  pgoyette 		  V=`git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \
    440  1.32.2.1  pgoyette 				--abbrev=7 --dirty` || \
    441  1.32.2.1  pgoyette 		  V=$(VERSION); } && \
    442  1.32.2.1  pgoyette 		printf '%s\n' "$$V" >$@.out
    443  1.32.2.1  pgoyette 		mv $@.out $@
    444  1.32.2.1  pgoyette 
    445  1.32.2.1  pgoyette version.h:	version
    446  1.32.2.1  pgoyette 		VERSION=`cat version` && printf '%s\n' \
    447  1.32.2.1  pgoyette 		  'static char const PKGVERSION[]="($(PACKAGE)) ";' \
    448  1.32.2.1  pgoyette 		  "static char const TZVERSION[]=\"$$VERSION\";" \
    449  1.32.2.1  pgoyette 		  'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";' \
    450  1.32.2.1  pgoyette 		  >$@.out
    451  1.32.2.1  pgoyette 		mv $@.out $@
    452       1.6  christos 
    453       1.1   mlelstv zdump:		$(TZDOBJS)
    454       1.9  christos 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
    455       1.1   mlelstv 
    456      1.32  christos zic:		$(TZCOBJS)
    457       1.9  christos 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
    458       1.1   mlelstv 
    459       1.1   mlelstv yearistype:	yearistype.sh
    460       1.1   mlelstv 		cp yearistype.sh yearistype
    461       1.1   mlelstv 		chmod +x yearistype
    462       1.1   mlelstv 
    463      1.16  christos leapseconds:	$(LEAP_DEPS)
    464  1.32.2.1  pgoyette 		$(AWK) -f leapseconds.awk leap-seconds.list >$@.out
    465  1.32.2.1  pgoyette 		mv $@.out $@
    466      1.15  christos 
    467      1.32  christos # Arguments to pass to submakes of install_data.
    468      1.32  christos # They can be overridden by later submake arguments.
    469      1.32  christos INSTALLARGS = \
    470      1.32  christos  DESTDIR=$(DESTDIR) \
    471      1.32  christos  LEAPSECONDS='$(LEAPSECONDS)' \
    472      1.32  christos  PACKRATDATA='$(PACKRATDATA)' \
    473      1.32  christos  TZDIR=$(TZDIR) \
    474      1.32  christos  YEARISTYPE=$(YEARISTYPE) \
    475      1.32  christos  ZIC='$(ZIC)'
    476      1.32  christos 
    477      1.32  christos # 'make install_data' installs one set of tz binary files.
    478      1.32  christos # It can be tailored by setting LEAPSECONDS, PACKRATDATA, etc.
    479      1.32  christos install_data:	zic leapseconds yearistype $(PACKRATDATA) $(TDATA)
    480      1.32  christos 		$(ZIC_INSTALL) $(TDATA)
    481      1.32  christos 		$(AWK) '/^Rule/' $(TDATA) | $(ZIC_INSTALL) - $(PACKRATDATA)
    482      1.32  christos 
    483      1.32  christos posix_only:
    484      1.32  christos 		$(MAKE) $(INSTALLARGS) LEAPSECONDS= install_data
    485      1.32  christos 
    486      1.32  christos right_only:
    487      1.32  christos 		$(MAKE) $(INSTALLARGS) LEAPSECONDS='-L leapseconds' \
    488      1.32  christos 			install_data
    489       1.1   mlelstv 
    490       1.1   mlelstv # In earlier versions of this makefile, the other two directories were
    491       1.1   mlelstv # subdirectories of $(TZDIR).  However, this led to configuration errors.
    492       1.1   mlelstv # For example, with posix_right under the earlier scheme,
    493       1.1   mlelstv # TZ='right/Australia/Adelaide' got you localtime with leap seconds,
    494       1.1   mlelstv # but gmtime without leap seconds, which led to problems with applications
    495       1.1   mlelstv # like sendmail that subtract gmtime from localtime.
    496       1.1   mlelstv # Therefore, the other two directories are now siblings of $(TZDIR).
    497       1.1   mlelstv # You must replace all of $(TZDIR) to switch from not using leap seconds
    498       1.1   mlelstv # to using them, or vice versa.
    499      1.32  christos right_posix:	right_only
    500      1.15  christos 		rm -fr $(DESTDIR)$(TZDIR)-leaps
    501      1.15  christos 		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-leaps || \
    502      1.32  christos 		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
    503      1.32  christos 		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
    504      1.15  christos 
    505      1.32  christos posix_right:	posix_only
    506      1.15  christos 		rm -fr $(DESTDIR)$(TZDIR)-posix
    507      1.15  christos 		ln -s $(TZDIR_BASENAME) $(DESTDIR)$(TZDIR)-posix || \
    508      1.32  christos 		  $(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-posix posix_only
    509      1.32  christos 		$(MAKE) $(INSTALLARGS) TZDIR=$(TZDIR)-leaps right_only
    510      1.32  christos 
    511      1.32  christos # This obsolescent rule is present for backwards compatibility with
    512      1.32  christos # tz releases 2014g through 2015g.  It should go away eventually.
    513      1.32  christos posix_packrat:
    514      1.32  christos 		$(MAKE) $(INSTALLARGS) PACKRATDATA=backzone posix_only
    515      1.23  christos 
    516       1.1   mlelstv zones:		$(REDO)
    517       1.1   mlelstv 
    518  1.32.2.1  pgoyette $(TZS_NEW):	$(TDATA) zdump zic
    519  1.32.2.1  pgoyette 		mkdir -p tzs.dir
    520  1.32.2.1  pgoyette 		$(zic) -d tzs.dir $(TDATA)
    521  1.32.2.1  pgoyette 		$(AWK) '/^Link/{print $$1 "\t" $$2 "\t" $$3}' \
    522  1.32.2.1  pgoyette 		   $(TDATA) | LC_ALL=C sort >$@.out
    523  1.32.2.1  pgoyette 		wd=`pwd` && \
    524  1.32.2.1  pgoyette 		zones=`$(AWK) -v wd="$$wd" \
    525  1.32.2.1  pgoyette 				'/^Zone/{print wd "/tzs.dir/" $$2}' $(TDATA) \
    526  1.32.2.1  pgoyette 			 | LC_ALL=C sort` && \
    527  1.32.2.1  pgoyette 		./zdump -i -c $(TZS_YEAR) $$zones >>$@.out
    528  1.32.2.1  pgoyette 		sed 's,^TZ=".*tzs\.dir/,TZ=",' $@.out >$@.sed.out
    529  1.32.2.1  pgoyette 		rm -fr tzs.dir $@.out
    530  1.32.2.1  pgoyette 		mv $@.sed.out $@
    531  1.32.2.1  pgoyette 
    532  1.32.2.1  pgoyette # If $(TZS) does not already exist (e.g., old-format tarballs), create it.
    533  1.32.2.1  pgoyette # If it exists but 'make check_tzs' fails, a maintainer should inspect the
    534  1.32.2.1  pgoyette # failed output and fix the inconsistency, perhaps by running 'make force_tzs'.
    535  1.32.2.1  pgoyette $(TZS):
    536  1.32.2.1  pgoyette 		$(MAKE) force_tzs
    537  1.32.2.1  pgoyette 
    538  1.32.2.1  pgoyette force_tzs:	$(TZS_NEW)
    539  1.32.2.1  pgoyette 		cp $(TZS_NEW) $(TZS)
    540  1.32.2.1  pgoyette 
    541      1.16  christos libtz.a:	$(LIBOBJS)
    542      1.16  christos 		$(AR) ru $@ $(LIBOBJS)
    543      1.16  christos 		$(RANLIB) $@
    544       1.1   mlelstv 
    545       1.1   mlelstv date:		$(DATEOBJS)
    546       1.9  christos 		$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS)
    547       1.1   mlelstv 
    548  1.32.2.1  pgoyette tzselect:	tzselect.ksh version
    549  1.32.2.1  pgoyette 		VERSION=`cat version` && sed \
    550       1.9  christos 			-e 's|#!/bin/bash|#!$(KSHELL)|g' \
    551       1.1   mlelstv 			-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
    552       1.9  christos 			-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
    553       1.9  christos 			-e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
    554       1.1   mlelstv 			-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
    555  1.32.2.1  pgoyette 			-e 's|\(TZVERSION\)=.*|\1='"$$VERSION"'|' \
    556  1.32.2.1  pgoyette 			<$@.ksh >$@.out
    557  1.32.2.1  pgoyette 		chmod +x $@.out
    558  1.32.2.1  pgoyette 		mv $@.out $@
    559       1.1   mlelstv 
    560      1.26  christos check:		check_character_set check_white_space check_links check_sorted \
    561  1.32.2.1  pgoyette 		  check_tables check_tzs check_web
    562       1.9  christos 
    563       1.9  christos check_character_set: $(ENCHILADA)
    564      1.22  christos 		LC_ALL=en_US.utf8 && export LC_ALL && \
    565      1.22  christos 		sharp='#' && \
    566  1.32.2.1  pgoyette 		! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \
    567  1.32.2.1  pgoyette 			$(MISC) $(SOURCES) $(WEB_PAGES) \
    568  1.32.2.1  pgoyette 			CONTRIBUTING LICENSE Makefile README version && \
    569      1.23  christos 		! grep -Env $(SAFE_SHARP_LINE) $(TDATA) backzone \
    570      1.29  christos 			leapseconds yearistype.sh zone.tab && \
    571      1.29  christos 		! grep -Env $(OK_LINE) $(ENCHILADA)
    572      1.22  christos 
    573      1.23  christos check_white_space: $(ENCHILADA)
    574  1.32.2.1  pgoyette 		patfmt=' \t|[\f\r\v]' && pat=`printf "$$patfmt\\n"` && \
    575  1.32.2.1  pgoyette 		! grep -En "$$pat" $(ENCHILADA)
    576      1.27  christos 		! grep -n '[[:space:]]$$' $(ENCHILADA)
    577      1.23  christos 
    578      1.23  christos CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
    579      1.23  christos 
    580      1.23  christos check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
    581      1.23  christos 		$(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
    582      1.23  christos 		$(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
    583      1.23  christos 		$(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
    584      1.23  christos 		$(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
    585      1.23  christos 		$(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
    586      1.23  christos 		  LC_ALL=C sort -c
    587      1.23  christos 		$(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
    588      1.23  christos 		  LC_ALL=C sort -cu
    589      1.23  christos 
    590      1.26  christos check_links:	checklinks.awk $(TDATA)
    591      1.26  christos 		$(AWK) -f checklinks.awk $(TDATA)
    592      1.26  christos 
    593      1.22  christos check_tables:	checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
    594      1.22  christos 		for tab in $(ZONETABLES); do \
    595      1.22  christos 		  $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
    596      1.22  christos 		    || exit; \
    597      1.22  christos 		done
    598       1.1   mlelstv 
    599  1.32.2.1  pgoyette check_tzs:	$(TZS) $(TZS_NEW)
    600  1.32.2.1  pgoyette 		diff -u $(TZS) $(TZS_NEW)
    601  1.32.2.1  pgoyette 
    602       1.1   mlelstv check_web:	$(WEB_PAGES)
    603       1.1   mlelstv 		$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES)
    604       1.1   mlelstv 
    605      1.14  christos clean_misc:
    606       1.6  christos 		rm -f core *.o *.out \
    607      1.18  christos 		  date tzselect version.h zdump zic yearistype libtz.a
    608      1.14  christos clean:		clean_misc
    609  1.32.2.1  pgoyette 		rm -fr *.dir tzdb-*/ $(TZS_NEW)
    610       1.1   mlelstv 
    611       1.1   mlelstv maintainer-clean: clean
    612       1.1   mlelstv 		@echo 'This command is intended for maintainers to use; it'
    613       1.1   mlelstv 		@echo 'deletes files that may need special tools to rebuild.'
    614  1.32.2.1  pgoyette 		rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.*
    615       1.1   mlelstv 
    616       1.1   mlelstv names:
    617       1.1   mlelstv 		@echo $(ENCHILADA)
    618       1.1   mlelstv 
    619      1.23  christos public:		check check_public $(CHECK_TIME_T_ALTERNATIVES) \
    620      1.16  christos 		tarballs signatures
    621      1.16  christos 
    622      1.16  christos date.1.txt:	date.1
    623      1.16  christos newctime.3.txt:	newctime.3
    624      1.16  christos newstrftime.3.txt: newstrftime.3
    625      1.16  christos newtzset.3.txt:	newtzset.3
    626      1.16  christos time2posix.3.txt: time2posix.3
    627      1.16  christos tzfile.5.txt:	tzfile.5
    628      1.16  christos tzselect.8.txt:	tzselect.8
    629      1.16  christos zdump.8.txt:	zdump.8
    630      1.16  christos zic.8.txt:	zic.8
    631      1.16  christos 
    632      1.16  christos $(MANTXTS):	workman.sh
    633  1.32.2.1  pgoyette 		LC_ALL=C sh workman.sh `expr $@ : '\(.*\)\.txt$$'` >$@.out
    634  1.32.2.1  pgoyette 		mv $@.out $@
    635       1.9  christos 
    636       1.6  christos # Set the time stamps to those of the git repository, if available,
    637       1.6  christos # and if the files have not changed since then.
    638       1.6  christos # This uses GNU 'touch' syntax 'touch -d@N FILE',
    639       1.6  christos # where N is the number of seconds since 1970.
    640      1.16  christos # If git or GNU 'touch' is absent, don't bother to sync with git timestamps.
    641      1.16  christos # Also, set the timestamp of each prebuilt file like 'leapseconds'
    642      1.16  christos # to be the maximum of the files it depends on.
    643      1.16  christos set-timestamps.out: $(ENCHILADA)
    644      1.16  christos 		rm -f $@
    645  1.32.2.1  pgoyette 		if (type git) >/dev/null 2>&1 && \
    646  1.32.2.1  pgoyette 		   files=`git ls-files $(ENCHILADA)` && \
    647      1.16  christos 		   touch -md @1 test.out; then \
    648      1.16  christos 		  rm -f test.out && \
    649      1.16  christos 		  for file in $$files; do \
    650      1.16  christos 		    if git diff --quiet $$file; then \
    651      1.16  christos 		      time=`git log -1 --format='tformat:%ct' $$file` && \
    652      1.16  christos 		      touch -cmd @$$time $$file; \
    653      1.16  christos 		    else \
    654      1.16  christos 		      echo >&2 "$$file: warning: does not match repository"; \
    655      1.16  christos 		    fi || exit; \
    656      1.16  christos 		  done; \
    657      1.16  christos 		fi
    658      1.16  christos 		touch -cmr `ls -t $(LEAP_DEPS) | sed 1q` leapseconds
    659      1.16  christos 		for file in `ls $(MANTXTS) | sed 's/\.txt$$//'`; do \
    660      1.16  christos 		  touch -cmr `ls -t $$file workman.sh | sed 1q` $$file.txt || \
    661      1.16  christos 		    exit; \
    662       1.6  christos 		done
    663  1.32.2.1  pgoyette 		touch -cmr `ls -t $(TZS_DEPS) | sed 1q` $(TZS)
    664  1.32.2.1  pgoyette 		touch -cmr `ls -t $(VERSION_DEPS) | sed 1q` version
    665      1.16  christos 		touch $@
    666       1.6  christos 
    667       1.1   mlelstv # The zics below ensure that each data file can stand on its own.
    668       1.1   mlelstv # We also do an all-files run to catch links to links.
    669       1.1   mlelstv 
    670      1.29  christos check_public:
    671      1.29  christos 		$(MAKE) maintainer-clean
    672      1.29  christos 		$(MAKE) "CFLAGS=$(GCC_DEBUG_FLAGS)" ALL
    673  1.32.2.1  pgoyette 		mkdir -p public.dir
    674       1.9  christos 		for i in $(TDATA) ; do \
    675  1.32.2.1  pgoyette 		  $(zic) -v -d public.dir $$i 2>&1 || exit; \
    676       1.9  christos 		done
    677  1.32.2.1  pgoyette 		$(zic) -v -d public.dir $(TDATA)
    678  1.32.2.1  pgoyette 		rm -fr public.dir
    679       1.9  christos 
    680      1.14  christos # Check that the code works under various alternative
    681      1.14  christos # implementations of time_t.
    682      1.14  christos check_time_t_alternatives:
    683      1.23  christos 		if diff -q Makefile Makefile 2>/dev/null; then \
    684      1.23  christos 		  quiet_option='-q'; \
    685      1.23  christos 		else \
    686      1.23  christos 		  quiet_option=''; \
    687      1.23  christos 		fi && \
    688  1.32.2.1  pgoyette 		wd=`pwd` && \
    689      1.22  christos 		zones=`$(AWK) '/^[^#]/ { print $$3 }' <zone1970.tab` && \
    690      1.14  christos 		for type in $(TIME_T_ALTERNATIVES); do \
    691  1.32.2.1  pgoyette 		  mkdir -p time_t.dir/$$type && \
    692      1.29  christos 		  $(MAKE) clean_misc && \
    693  1.32.2.1  pgoyette 		  $(MAKE) TOPDIR="$$wd/time_t.dir/$$type" \
    694      1.14  christos 		    CFLAGS='$(CFLAGS) -Dtime_tz='"'$$type'" \
    695      1.23  christos 		    REDO='$(REDO)' \
    696      1.14  christos 		    install && \
    697      1.23  christos 		  diff $$quiet_option -r \
    698  1.32.2.1  pgoyette 		    time_t.dir/int64_t/etc/zoneinfo \
    699  1.32.2.1  pgoyette 		    time_t.dir/$$type/etc/zoneinfo && \
    700      1.14  christos 		  case $$type in \
    701      1.14  christos 		  int32_t) range=-2147483648,2147483647;; \
    702      1.14  christos 		  uint32_t) range=0,4294967296;; \
    703      1.14  christos 		  int64_t) continue;; \
    704      1.14  christos 		  *u*) range=0,10000000000;; \
    705      1.14  christos 		  *) range=-10000000000,10000000000;; \
    706      1.14  christos 		  esac && \
    707      1.14  christos 		  echo checking $$type zones ... && \
    708  1.32.2.1  pgoyette 		  time_t.dir/int64_t/etc/zdump -V -t $$range $$zones \
    709  1.32.2.1  pgoyette 		      >time_t.dir/int64_t.out && \
    710  1.32.2.1  pgoyette 		  time_t.dir/$$type/etc/zdump -V -t $$range $$zones \
    711  1.32.2.1  pgoyette 		      >time_t.dir/$$type.out && \
    712  1.32.2.1  pgoyette 		  diff -u time_t.dir/int64_t.out time_t.dir/$$type.out \
    713      1.14  christos 		    || exit; \
    714      1.14  christos 		done
    715  1.32.2.1  pgoyette 		rm -fr time_t.dir
    716  1.32.2.1  pgoyette 
    717  1.32.2.1  pgoyette tarballs signatures: version
    718  1.32.2.1  pgoyette 		$(MAKE) VERSION="$$(cat version)" $@_version
    719      1.14  christos 
    720  1.32.2.1  pgoyette tarballs_version: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \
    721  1.32.2.1  pgoyette 		tzdb-$(VERSION).tar.lz
    722  1.32.2.1  pgoyette tarballs traditional_tarballs signatures traditional_signatures: version
    723  1.32.2.1  pgoyette 		VERSION=`cat version` && \
    724  1.32.2.1  pgoyette 		$(MAKE) VERSION="$$VERSION" $@_version
    725  1.32.2.1  pgoyette 
    726  1.32.2.1  pgoyette tarballs_version: traditional_tarballs_version tzdb-$(VERSION).tar.lz
    727  1.32.2.1  pgoyette traditional_tarballs_version: \
    728  1.32.2.1  pgoyette   tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz
    729  1.32.2.1  pgoyette signatures_version: traditional_signatures_version tzdb-$(VERSION).tar.lz.asc
    730  1.32.2.1  pgoyette traditional_signatures_version: \
    731  1.32.2.1  pgoyette   tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
    732       1.9  christos 
    733      1.16  christos tzcode$(VERSION).tar.gz: set-timestamps.out
    734       1.6  christos 		LC_ALL=C && export LC_ALL && \
    735       1.7  christos 		tar $(TARFLAGS) -cf - \
    736      1.23  christos 		    $(COMMON) $(DOCS) $(SOURCES) | \
    737      1.17       apb 		  ${TOOL_GZIP} $(GZIPFLAGS) > $@
    738  1.32.2.1  pgoyette 		  ${TOOL_GZIP} $(GZIPFLAGS) >$@.out
    739  1.32.2.1  pgoyette 		mv $@.out $@
    740      1.10  christos 
    741      1.16  christos tzdata$(VERSION).tar.gz: set-timestamps.out
    742       1.6  christos 		LC_ALL=C && export LC_ALL && \
    743      1.23  christos 		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \
    744  1.32.2.1  pgoyette 		  ${TOOL_GZIP} $(GZIPFLAGS) > $@.out
    745  1.32.2.1  pgoyette 		mv $@.out $@
    746       1.9  christos 
    747  1.32.2.1  pgoyette tzdb-$(VERSION).tar.lz: set-timestamps.out
    748  1.32.2.1  pgoyette 		rm -fr tzdb-$(VERSION)
    749  1.32.2.1  pgoyette 		mkdir tzdb-$(VERSION)
    750  1.32.2.1  pgoyette 		ln $(ENCHILADA) tzdb-$(VERSION)
    751  1.32.2.1  pgoyette 		touch -cmr `ls -t tzdb-$(VERSION)/* | sed 1q` tzdb-$(VERSION)
    752  1.32.2.1  pgoyette 		LC_ALL=C && export LC_ALL && \
    753  1.32.2.1  pgoyette 		tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 >$@.out
    754  1.32.2.1  pgoyette 		mv $@.out $@
    755       1.9  christos 
    756       1.9  christos tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
    757       1.9  christos 		gpg --armor --detach-sign $?
    758       1.9  christos 
    759       1.9  christos tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
    760       1.9  christos 		gpg --armor --detach-sign $?
    761       1.1   mlelstv 
    762  1.32.2.1  pgoyette tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
    763  1.32.2.1  pgoyette 		gpg --armor --detach-sign $?
    764  1.32.2.1  pgoyette 
    765       1.1   mlelstv typecheck:
    766      1.29  christos 		$(MAKE) clean
    767      1.15  christos 		for i in "long long" unsigned; \
    768       1.1   mlelstv 		do \
    769      1.29  christos 			$(MAKE) CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
    770       1.1   mlelstv 			./zdump -v Europe/Rome ; \
    771      1.29  christos 			$(MAKE) clean ; \
    772       1.1   mlelstv 		done
    773       1.1   mlelstv 
    774       1.1   mlelstv zonenames:	$(TDATA)
    775       1.1   mlelstv 		@$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
    776       1.1   mlelstv 
    777       1.1   mlelstv asctime.o:	private.h tzfile.h
    778       1.1   mlelstv date.o:		private.h
    779       1.1   mlelstv difftime.o:	private.h
    780       1.1   mlelstv localtime.o:	private.h tzfile.h
    781      1.23  christos strftime.o:	private.h tzfile.h
    782       1.6  christos zdump.o:	version.h
    783       1.6  christos zic.o:		private.h tzfile.h version.h
    784       1.1   mlelstv 
    785       1.1   mlelstv .KEEP_STATE:
    786      1.22  christos 
    787      1.22  christos .PHONY: ALL INSTALL all
    788      1.26  christos .PHONY: check check_character_set check_links
    789      1.26  christos .PHONY: check_public check_sorted check_tables
    790  1.32.2.1  pgoyette .PHONY: check_time_t_alternatives check_tzs check_web check_white_space
    791  1.32.2.1  pgoyette .PHONY: clean clean_misc force_tzs
    792      1.32  christos .PHONY: install install_data maintainer-clean names
    793      1.32  christos .PHONY: posix_only posix_packrat posix_right
    794  1.32.2.1  pgoyette .PHONY: public right_only right_posix signatures signatures_version
    795  1.32.2.1  pgoyette .PHONY: tarballs tarballs_version typecheck
    796      1.22  christos .PHONY: zonenames zones
    797