Makefile revision 1.6
11.1Smlelstv# <pre> 21.1Smlelstv# This file is in the public domain, so clarified as of 31.1Smlelstv# 2009-05-17 by Arthur David Olson. 41.1Smlelstv 51.6Schristos# Version numbers of the code and data distributions. 61.6SchristosVERSION = 2012e 71.6Schristos 81.1Smlelstv# Change the line below for your time zone (after finding the zone you want in 91.1Smlelstv# the time zone files, or adding it to a time zone file). 101.1Smlelstv# Alternately, if you discover you've got the wrong time zone, you can just 111.1Smlelstv# zic -l rightzone 121.1Smlelstv# to correct things. 131.1Smlelstv# Use the command 141.1Smlelstv# make zonenames 151.1Smlelstv# to get a list of the values you can use for LOCALTIME. 161.1Smlelstv 171.4SchristosLOCALTIME= GMT 181.1Smlelstv 191.1Smlelstv# If you want something other than Eastern United States time as a template 201.1Smlelstv# for handling POSIX-style time zone environment variables, 211.1Smlelstv# change the line below (after finding the zone you want in the 221.1Smlelstv# time zone files, or adding it to a time zone file). 231.1Smlelstv# (When a POSIX-style environment variable is handled, the rules in the 241.1Smlelstv# template file are used to determine "spring forward" and "fall back" days and 251.1Smlelstv# times; the environment variable itself specifies UTC offsets of standard and 261.1Smlelstv# summer time.) 271.1Smlelstv# Alternately, if you discover you've got the wrong time zone, you can just 281.1Smlelstv# zic -p rightzone 291.1Smlelstv# to correct things. 301.1Smlelstv# Use the command 311.1Smlelstv# make zonenames 321.1Smlelstv# to get a list of the values you can use for POSIXRULES. 331.1Smlelstv# If you want POSIX compatibility, use "America/New_York". 341.1Smlelstv 351.1SmlelstvPOSIXRULES= America/New_York 361.1Smlelstv 371.1Smlelstv# Also see TZDEFRULESTRING below, which takes effect only 381.1Smlelstv# if the time zone files cannot be accessed. 391.1Smlelstv 401.1Smlelstv# Everything gets put in subdirectories of. . . 411.1Smlelstv 421.1SmlelstvTOPDIR= /usr/local 431.1Smlelstv 441.1Smlelstv# "Compiled" time zone information is placed in the "TZDIR" directory 451.1Smlelstv# (and subdirectories). 461.1Smlelstv# Use an absolute path name for TZDIR unless you're just testing the software. 471.1Smlelstv 481.1SmlelstvTZDIR= $(TOPDIR)/etc/zoneinfo 491.1Smlelstv 501.1Smlelstv# The "tzselect", "zic", and "zdump" commands get installed in. . . 511.1Smlelstv 521.1SmlelstvETCDIR= $(TOPDIR)/etc 531.1Smlelstv 541.1Smlelstv# If you "make INSTALL", the "date" command gets installed in. . . 551.1Smlelstv 561.1SmlelstvBINDIR= $(TOPDIR)/bin 571.1Smlelstv 581.1Smlelstv# Manual pages go in subdirectories of. . . 591.1Smlelstv 601.1SmlelstvMANDIR= $(TOPDIR)/man 611.1Smlelstv 621.1Smlelstv# Library functions are put in an archive in LIBDIR. 631.1Smlelstv 641.1SmlelstvLIBDIR= $(TOPDIR)/lib 651.1SmlelstvTZLIB= $(LIBDIR)/libtz.a 661.1Smlelstv 671.1Smlelstv# If you always want time values interpreted as "seconds since the epoch 681.1Smlelstv# (not counting leap seconds)", use 691.1Smlelstv# REDO= posix_only 701.1Smlelstv# below. If you always want right time values interpreted as "seconds since 711.1Smlelstv# the epoch" (counting leap seconds)", use 721.1Smlelstv# REDO= right_only 731.1Smlelstv# below. If you want both sets of data available, with leap seconds not 741.1Smlelstv# counted normally, use 751.1Smlelstv# REDO= posix_right 761.1Smlelstv# below. If you want both sets of data available, with leap seconds counted 771.1Smlelstv# normally, use 781.1Smlelstv# REDO= right_posix 791.1Smlelstv# below. 801.1Smlelstv# POSIX mandates that leap seconds not be counted; for compatibility with it, 811.1Smlelstv# use either "posix_only" or "posix_right". 821.1Smlelstv 831.1SmlelstvREDO= posix_right 841.1Smlelstv 851.1Smlelstv# Since "." may not be in PATH... 861.1Smlelstv 871.1SmlelstvYEARISTYPE= ./yearistype 881.1Smlelstv 891.1Smlelstv# Non-default libraries needed to link. 901.1Smlelstv# Add -lintl if you want to use `gettext' on Solaris. 911.1SmlelstvLDLIBS= 921.1Smlelstv 931.1Smlelstv# Add the following to the end of the "CFLAGS=" line as needed. 941.1Smlelstv# -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?) 951.1Smlelstv# -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS 961.1Smlelstv# -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares 971.1Smlelstv# ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8). 981.1Smlelstv# -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?) 991.1Smlelstv# -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4) 1001.1Smlelstv# -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD) 1011.1Smlelstv# -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD) 1021.1Smlelstv# -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h" 1031.1Smlelstv# -DHAVE_SYMLINK=0 if your system lacks the symlink function 1041.1Smlelstv# -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h" 1051.1Smlelstv# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h" 1061.1Smlelstv# -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale" 1071.1Smlelstv# -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?) 1081.1Smlelstv# -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h" 1091.1Smlelstv# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified 1101.1Smlelstv# DST transitions if the time zone files cannot be accessed 1111.1Smlelstv# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" 1121.1Smlelstv# -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; 1131.1Smlelstv# the default is system-supplied, typically "/usr/lib/locale" 1141.1Smlelstv# $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking 1151.1Smlelstv# -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1 1161.1Smlelstv# if you do not want run time warnings about formats that may cause 1171.1Smlelstv# year 2000 grief 1181.5Schristos# -DNO_ERROR_IN_DST_GAP=1 1191.5Schristos# if you want mktime() not to return an error in the DST gap. 1201.1Smlelstv# -DZIC_MAX_ABBR_LEN_WO_WARN=3 1211.1Smlelstv# (or some other number) to set the maximum time zone abbreviation length 1221.1Smlelstv# that zic will accept without a warning (the default is 6) 1231.4SchristosGCC_DEBUG_FLAGS = -Dlint -g -O3 -fno-common \ 1241.1Smlelstv -Wall -Wcast-qual -Wconversion -Wmissing-prototypes \ 1251.1Smlelstv -Wnested-externs -Wpointer-arith -Wshadow \ 1261.1Smlelstv -Wtraditional # -Wstrict-prototypes -Wwrite-strings 1271.1Smlelstv# 1281.1Smlelstv# If you want to use System V compatibility code, add 1291.1Smlelstv# -DUSG_COMPAT 1301.1Smlelstv# to the end of the "CFLAGS=" line. This arrange for "timezone" and "daylight" 1311.1Smlelstv# variables to be kept up-to-date by the time conversion functions. Neither 1321.1Smlelstv# "timezone" nor "daylight" is described in X3J11's work. 1331.1Smlelstv# 1341.1Smlelstv# If your system has a "GMT offset" field in its "struct tm"s 1351.1Smlelstv# (or if you decide to add such a field in your system's "time.h" file), 1361.1Smlelstv# add the name to a define such as 1371.1Smlelstv# -DTM_GMTOFF=tm_gmtoff 1381.1Smlelstv# or 1391.1Smlelstv# -DTM_GMTOFF=_tm_gmtoff 1401.1Smlelstv# to the end of the "CFLAGS=" line. 1411.1Smlelstv# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work; 1421.1Smlelstv# in its work, use of "tm_gmtoff" is described as non-conforming. 1431.1Smlelstv# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in 1441.1Smlelstv# their recent releases. 1451.1Smlelstv# 1461.1Smlelstv# If your system has a "zone abbreviation" field in its "struct tm"s 1471.1Smlelstv# (or if you decide to add such a field in your system's "time.h" file), 1481.1Smlelstv# add the name to a define such as 1491.1Smlelstv# -DTM_ZONE=tm_zone 1501.1Smlelstv# or 1511.1Smlelstv# -DTM_ZONE=_tm_zone 1521.1Smlelstv# to the end of the "CFLAGS=" line. 1531.1Smlelstv# Neither tm_zone nor _tm_zone is described in X3J11's work; 1541.1Smlelstv# in its work, use of "tm_zone" is described as non-conforming. 1551.1Smlelstv# Both UCB and Sun have done the equivalent of defining TM_ZONE in 1561.1Smlelstv# their recent releases. 1571.1Smlelstv# 1581.1Smlelstv# If you want functions that were inspired by early versions of X3J11's work, 1591.1Smlelstv# add 1601.1Smlelstv# -DSTD_INSPIRED 1611.1Smlelstv# to the end of the "CFLAGS=" line. This arranges for the functions 1621.1Smlelstv# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff", 1631.1Smlelstv# "posix2time", and "time2posix" to be added to the time conversion library. 1641.1Smlelstv# "tzsetwall" is like "tzset" except that it arranges for local wall clock 1651.1Smlelstv# time (rather than the time specified in the TZ environment variable) 1661.1Smlelstv# to be used. 1671.1Smlelstv# "offtime" is like "gmtime" except that it accepts a second (long) argument 1681.1Smlelstv# that gives an offset to add to the time_t when converting it. 1691.1Smlelstv# "timelocal" is equivalent to "mktime". 1701.1Smlelstv# "timegm" is like "timelocal" except that it turns a struct tm into 1711.1Smlelstv# a time_t using UTC (rather than local time as "timelocal" does). 1721.1Smlelstv# "timeoff" is like "timegm" except that it accepts a second (long) argument 1731.1Smlelstv# that gives an offset to use when converting to a time_t. 1741.1Smlelstv# "posix2time" and "time2posix" are described in an included manual page. 1751.1Smlelstv# X3J11's work does not describe any of these functions. 1761.1Smlelstv# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0. 1771.1Smlelstv# These functions may well disappear in future releases of the time 1781.1Smlelstv# conversion package. 1791.1Smlelstv# 1801.1Smlelstv# If you want Source Code Control System ID's left out of object modules, add 1811.1Smlelstv# -DNOID 1821.1Smlelstv# to the end of the "CFLAGS=" line. 1831.1Smlelstv# 1841.1Smlelstv# If you'll never want to handle solar-time-based time zones, add 1851.1Smlelstv# -DNOSOLAR 1861.1Smlelstv# to the end of the "CFLAGS=" line 1871.1Smlelstv# (and comment out the "SDATA=" line below). 1881.1Smlelstv# This reduces (slightly) the run-time data-space requirements of 1891.1Smlelstv# the time conversion functions; it may reduce the acceptability of your system 1901.1Smlelstv# to folks in oil- and cash-rich places. 1911.1Smlelstv# 1921.1Smlelstv# If you want to allocate state structures in localtime, add 1931.1Smlelstv# -DALL_STATE 1941.1Smlelstv# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc. 1951.1Smlelstv# 1961.1Smlelstv# If you want an "altzone" variable (a la System V Release 3.1), add 1971.1Smlelstv# -DALTZONE 1981.1Smlelstv# to the end of the "CFLAGS=" line. 1991.1Smlelstv# This variable is not described in X3J11's work. 2001.1Smlelstv# 2011.1Smlelstv# If you want a "gtime" function (a la MACH), add 2021.1Smlelstv# -DCMUCS 2031.1Smlelstv# to the end of the "CFLAGS=" line 2041.1Smlelstv# This function is not described in X3J11's work. 2051.1Smlelstv# 2061.1Smlelstv# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put 2071.1Smlelstv# out by the National Institute of Standards and Technology 2081.1Smlelstv# which claims to test C and Posix conformance. If you want to pass PCTS, add 2091.1Smlelstv# -DPCTS 2101.1Smlelstv# to the end of the "CFLAGS=" line. 2111.1Smlelstv# 2121.1Smlelstv# If you want strict compliance with XPG4 as of 1994-04-09, add 2131.1Smlelstv# -DXPG4_1994_04_09 2141.1Smlelstv# to the end of the "CFLAGS=" line. This causes "strftime" to always return 2151.1Smlelstv# 53 as a week number (rather than 52 or 53) for those days in January that 2161.1Smlelstv# before the first Monday in January when a "%V" format is used and January 1 2171.1Smlelstv# falls on a Friday, Saturday, or Sunday. 2181.1Smlelstv 2191.1SmlelstvCFLAGS= 2201.1Smlelstv 2211.1Smlelstv# If you want zic's -s option used when installing, uncomment the next line 2221.1Smlelstv# ZFLAGS= -s 2231.1Smlelstv 2241.1Smlelstvzic= ./zic 2251.1SmlelstvZIC= $(zic) $(ZFLAGS) 2261.1Smlelstv 2271.1Smlelstv# The name of a Posix-compliant `awk' on your system. 2281.1SmlelstvAWK= nawk 2291.1Smlelstv 2301.1Smlelstv# The path where SGML DTDs are kept. 2311.6Schristos# The default is appropriate for Ubuntu. 2321.6SchristosSGML_TOPDIR= /usr 2331.6SchristosSGML_SEARCH_PATH= $(SGML_TOPDIR)/share/xml/xhtml/schema/dtd/REC-html401-19991224 2341.1Smlelstv 2351.1Smlelstv# The catalog file(s) to use when validating. 2361.1SmlelstvSGML_CATALOG_FILES= HTML4.cat 2371.1Smlelstv 2381.1Smlelstv# The name, arguments and environment of a program to validate your web pages. 2391.1Smlelstv# See <http://www.jclark.com/sp/> for a validator, and 2401.1Smlelstv# <http://validator.w3.org/source/> for a validation library. 2411.1SmlelstvVALIDATE = nsgmls 2421.1SmlelstvVALIDATE_FLAGS = -s -B -wall -wno-unused-param 2431.1SmlelstvVALIDATE_ENV = \ 2441.1Smlelstv SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \ 2451.1Smlelstv SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \ 2461.1Smlelstv SP_CHARSET_FIXED=YES \ 2471.1Smlelstv SP_ENCODING=UTF-8 2481.1Smlelstv 2491.6Schristos# Flags to give 'tar' when making a distribution. 2501.6Schristos# Try to use flags appropriate for GNU tar. 2511.6SchristosGNUTARFLAGS= --numeric-owner --owner=0 --group=0 --mode=go+u,go-w 2521.6SchristosTARFLAGS= `if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; \ 2531.6Schristos then echo $(GNUTARFLAGS); \ 2541.6Schristos else :; \ 2551.6Schristos fi` 2561.6Schristos 2571.6Schristos# Flags to give 'gzip' when making a distribution. 2581.6SchristosGZIPFLAGS= -9n 2591.6Schristos 2601.1Smlelstv############################################################################### 2611.1Smlelstv 2621.1Smlelstvcc= cc 2631.1SmlelstvCC= $(cc) -DTZDIR=\"$(TZDIR)\" 2641.1Smlelstv 2651.1SmlelstvTZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c 2661.1SmlelstvTZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o 2671.1SmlelstvTZDSRCS= zdump.c localtime.c ialloc.c 2681.1SmlelstvTZDOBJS= zdump.o localtime.o ialloc.o 2691.1SmlelstvDATESRCS= date.c localtime.c strftime.c asctime.c 2701.1SmlelstvDATEOBJS= date.o localtime.o strftime.o asctime.o 2711.1SmlelstvLIBSRCS= localtime.c asctime.c difftime.c 2721.1SmlelstvLIBOBJS= localtime.o asctime.o difftime.o 2731.1SmlelstvHEADERS= tzfile.h private.h 2741.1SmlelstvNONLIBSRCS= zic.c zdump.c scheck.c ialloc.c 2751.1SmlelstvNEWUCBSRCS= date.c strftime.c 2761.1SmlelstvSOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh 2771.1SmlelstvMANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ 2781.1Smlelstv tzfile.5 tzselect.8 zic.8 zdump.8 2791.1SmlelstvDOCS= README Theory $(MANS) date.1 Makefile 2801.1SmlelstvPRIMARY_YDATA= africa antarctica asia australasia \ 2811.1Smlelstv europe northamerica southamerica 2821.4SchristosYDATA= $(PRIMARY_YDATA) pacificnew etcetera backward 2831.4SchristosNDATA= systemv factory 2841.1SmlelstvSDATA= solar87 solar88 solar89 2851.1SmlelstvTDATA= $(YDATA) $(NDATA) $(SDATA) 2861.1SmlelstvTABDATA= iso3166.tab zone.tab 2871.1SmlelstvDATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) leapseconds yearistype.sh 2881.1SmlelstvWEB_PAGES= tz-art.htm tz-link.htm 2891.1SmlelstvMISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \ 2901.4Schristos $(WEB_PAGES) checktab.awk workman.sh \ 2911.1Smlelstv zoneinfo2tdf.pl 2921.1SmlelstvENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(MISC) 2931.1Smlelstv 2941.1Smlelstv# And for the benefit of csh users on systems that assume the user 2951.1Smlelstv# shell should be used to handle commands in Makefiles. . . 2961.1Smlelstv 2971.1SmlelstvSHELL= /bin/sh 2981.1Smlelstv 2991.1Smlelstvall: tzselect zic zdump $(LIBOBJS) 3001.1Smlelstv 3011.1SmlelstvALL: all date 3021.1Smlelstv 3031.1Smlelstvinstall: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA) 3041.1Smlelstv $(ZIC) -y $(YEARISTYPE) \ 3051.1Smlelstv -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES) 3061.1Smlelstv -rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab 3071.1Smlelstv cp iso3166.tab zone.tab $(TZDIR)/. 3081.1Smlelstv -mkdir $(TOPDIR) $(ETCDIR) 3091.1Smlelstv cp tzselect zic zdump $(ETCDIR)/. 3101.1Smlelstv -mkdir $(TOPDIR) $(MANDIR) \ 3111.1Smlelstv $(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8 3121.1Smlelstv -rm -f $(MANDIR)/man3/newctime.3 \ 3131.1Smlelstv $(MANDIR)/man3/newtzset.3 \ 3141.1Smlelstv $(MANDIR)/man5/tzfile.5 \ 3151.1Smlelstv $(MANDIR)/man8/tzselect.8 \ 3161.1Smlelstv $(MANDIR)/man8/zdump.8 \ 3171.1Smlelstv $(MANDIR)/man8/zic.8 3181.1Smlelstv cp newctime.3 newtzset.3 $(MANDIR)/man3/. 3191.1Smlelstv cp tzfile.5 $(MANDIR)/man5/. 3201.1Smlelstv cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/. 3211.1Smlelstv 3221.1SmlelstvINSTALL: ALL install date.1 3231.1Smlelstv -mkdir $(TOPDIR) $(BINDIR) 3241.1Smlelstv cp date $(BINDIR)/. 3251.1Smlelstv -mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1 3261.1Smlelstv -rm -f $(MANDIR)/man1/date.1 3271.1Smlelstv cp date.1 $(MANDIR)/man1/. 3281.1Smlelstv 3291.6Schristosversion.h: 3301.6Schristos echo >$@ \ 3311.6Schristos 'static char const TZVERSION[]="tz$(VERSION)";' 3321.6Schristos 3331.1Smlelstvzdump: $(TZDOBJS) 3341.1Smlelstv $(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@ 3351.1Smlelstv 3361.1Smlelstvzic: $(TZCOBJS) yearistype 3371.1Smlelstv $(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@ 3381.1Smlelstv 3391.1Smlelstvyearistype: yearistype.sh 3401.1Smlelstv cp yearistype.sh yearistype 3411.1Smlelstv chmod +x yearistype 3421.1Smlelstv 3431.1Smlelstvposix_only: zic $(TDATA) 3441.1Smlelstv $(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA) 3451.1Smlelstv 3461.1Smlelstvright_only: zic leapseconds $(TDATA) 3471.1Smlelstv $(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA) 3481.1Smlelstv 3491.1Smlelstv# In earlier versions of this makefile, the other two directories were 3501.1Smlelstv# subdirectories of $(TZDIR). However, this led to configuration errors. 3511.1Smlelstv# For example, with posix_right under the earlier scheme, 3521.1Smlelstv# TZ='right/Australia/Adelaide' got you localtime with leap seconds, 3531.1Smlelstv# but gmtime without leap seconds, which led to problems with applications 3541.1Smlelstv# like sendmail that subtract gmtime from localtime. 3551.1Smlelstv# Therefore, the other two directories are now siblings of $(TZDIR). 3561.1Smlelstv# You must replace all of $(TZDIR) to switch from not using leap seconds 3571.1Smlelstv# to using them, or vice versa. 3581.1Smlelstvother_two: zic leapseconds $(TDATA) 3591.1Smlelstv $(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA) 3601.1Smlelstv $(ZIC) -y $(YEARISTYPE) \ 3611.1Smlelstv -d $(TZDIR)-leaps -L leapseconds $(TDATA) 3621.1Smlelstv 3631.1Smlelstvposix_right: posix_only other_two 3641.1Smlelstv 3651.1Smlelstvright_posix: right_only other_two 3661.1Smlelstv 3671.1Smlelstvzones: $(REDO) 3681.1Smlelstv 3691.1Smlelstv$(TZLIB): $(LIBOBJS) 3701.1Smlelstv -mkdir $(TOPDIR) $(LIBDIR) 3711.1Smlelstv ar ru $@ $(LIBOBJS) 3721.1Smlelstv if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \ 3731.1Smlelstv then ranlib $@ ; fi 3741.1Smlelstv 3751.1Smlelstvdate: $(DATEOBJS) 3761.1Smlelstv $(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \ 3771.1Smlelstv $(LDLIBS) -lc -o $@ 3781.1Smlelstv 3791.1Smlelstvtzselect: tzselect.ksh 3801.1Smlelstv sed \ 3811.1Smlelstv -e 's|AWK=[^}]*|AWK=$(AWK)|g' \ 3821.1Smlelstv -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \ 3831.6Schristos -e 's|\(TZVERSION\)=.*|\1=tz$(VERSION)|' \ 3841.1Smlelstv <$? >$@ 3851.1Smlelstv chmod +x $@ 3861.1Smlelstv 3871.1Smlelstvcheck: check_tables check_web 3881.1Smlelstv 3891.1Smlelstvcheck_tables: checktab.awk $(PRIMARY_YDATA) 3901.1Smlelstv $(AWK) -f checktab.awk $(PRIMARY_YDATA) 3911.1Smlelstv 3921.1Smlelstvcheck_web: $(WEB_PAGES) 3931.1Smlelstv $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) $(WEB_PAGES) 3941.1Smlelstv 3951.1Smlelstvclean: 3961.6Schristos rm -f core *.o *.out \ 3971.6Schristos date tzselect version.h zdump zic yearistype 3981.1Smlelstv 3991.1Smlelstvmaintainer-clean: clean 4001.1Smlelstv @echo 'This command is intended for maintainers to use; it' 4011.1Smlelstv @echo 'deletes files that may need special tools to rebuild.' 4021.6Schristos rm -f *.[1-8].txt tzcode*.tar.gz tzdata*.tar.gz 4031.1Smlelstv 4041.1Smlelstvnames: 4051.1Smlelstv @echo $(ENCHILADA) 4061.1Smlelstv 4071.6Schristos# Set the time stamps to those of the git repository, if available, 4081.6Schristos# and if the files have not changed since then. 4091.6Schristos# This uses GNU 'touch' syntax 'touch -d@N FILE', 4101.6Schristos# where N is the number of seconds since 1970. 4111.6Schristos# If git or GNU 'touch' is absent, do nothing. 4121.6Schristosset-timestamps: 4131.6Schristos -TZ=UTC0 && export TZ && files=`git ls-files` && \ 4141.6Schristos touch -d @1 test.out && rm -f test.out && \ 4151.6Schristos for file in $$files; do \ 4161.6Schristos test -z "`git diff --name-only $$file`" || continue; \ 4171.6Schristos cmd="touch -d @`git log -1 --format='format:%ct' $$file \ 4181.6Schristos ` $$file" && \ 4191.6Schristos echo "$$cmd" && \ 4201.6Schristos $$cmd || exit; \ 4211.6Schristos done 4221.6Schristos 4231.1Smlelstv# The zics below ensure that each data file can stand on its own. 4241.1Smlelstv# We also do an all-files run to catch links to links. 4251.1Smlelstv 4261.6Schristospublic: $(ENCHILADA) set-timestamps 4271.1Smlelstv make maintainer-clean 4281.3Smartin make "CFLAGS=$(GCC_DEBUG_FLAGS)" 4291.6Schristos mkdir -m go-rwx /tmp/,tzpublic 4301.1Smlelstv -for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 2>&1 | grep -v "starting year" ; done 4311.1Smlelstv for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit; done 4321.1Smlelstv zic -v -d /tmp/,tzpublic $(TDATA) || exit 4331.1Smlelstv rm -f -r /tmp/,tzpublic 4341.6Schristos for i in *.[1-8] ; do \ 4351.6Schristos LC_ALL=C sh workman.sh $$i > $$i.txt && \ 4361.6Schristos touch -r $$i $$i.txt || exit; \ 4371.6Schristos done 4381.1Smlelstv $(AWK) -f checktab.awk $(PRIMARY_YDATA) 4391.6Schristos LC_ALL=C && export LC_ALL && \ 4401.6Schristos tar $(TARFLAGS) -cf - $(DOCS) $(SOURCES) $(MISC) *.[1-8].txt | \ 4411.6Schristos gzip $(GZIPFLAGS) > tzcode$(VERSION).tar.gz 4421.6Schristos LC_ALL=C && export LC_ALL && \ 4431.6Schristos tar $(TARFLAGS) -cf - $(DATA) | \ 4441.6Schristos gzip $(GZIPFLAGS) > tzdata$(VERSION).tar.gz 4451.1Smlelstv 4461.1Smlelstvtypecheck: 4471.1Smlelstv make clean 4481.1Smlelstv for i in "long long" unsigned double; \ 4491.1Smlelstv do \ 4501.1Smlelstv make CFLAGS="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \ 4511.1Smlelstv ./zdump -v Europe/Rome ; \ 4521.1Smlelstv make clean ; \ 4531.1Smlelstv done 4541.1Smlelstv 4551.1Smlelstvzonenames: $(TDATA) 4561.1Smlelstv @$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA) 4571.1Smlelstv 4581.1Smlelstvasctime.o: private.h tzfile.h 4591.1Smlelstvdate.o: private.h 4601.1Smlelstvdifftime.o: private.h 4611.1Smlelstvialloc.o: private.h 4621.1Smlelstvlocaltime.o: private.h tzfile.h 4631.1Smlelstvscheck.o: private.h 4641.1Smlelstvstrftime.o: tzfile.h 4651.6Schristoszdump.o: version.h 4661.6Schristoszic.o: private.h tzfile.h version.h 4671.1Smlelstv 4681.1Smlelstv.KEEP_STATE: 469