3 # Change the line below for your time zone (after finding the zone you want in
4 # the time zone files, or adding it to a time zone file).
5 # Alternately, if you discover you've got the wrong time zone, you can just
10 # to get a list of the values you can use for LOCALTIME.
14 # If you want something other than Eastern United States time as a template
15 # for handling POSIX-style time zone environment variables,
16 # change the line below (after finding the zone you want in the
17 # time zone files, or adding it to a time zone file).
18 # (When a POSIX-style environment variable is handled, the rules in the
19 # template file are used to determine "spring forward" and "fall back" days and
20 # times; the environment variable itself specifies UTC offsets of standard and
22 # Alternately, if you discover you've got the wrong time zone, you can just
27 # to get a list of the values you can use for POSIXRULES.
28 # If you want POSIX compatibility, use "America/New_York".
30 POSIXRULES
= America
/New_York
32 # Also see TZDEFRULESTRING below, which takes effect only
33 # if the time zone files cannot be accessed.
35 # Everything gets put in subdirectories of. . .
39 # "Compiled" time zone information is placed in the "TZDIR" directory
40 # (and subdirectories).
41 # Use an absolute path name for TZDIR unless you're just testing the software.
43 TZDIR
= $(TOPDIR
)/share
/zoneinfo
45 # The "tzselect", "zic", and "zdump" commands get installed in. . .
49 # If you "make INSTALL", the "date" command gets installed in. . .
53 # Library functions are put in an archive in LIBDIR.
57 # If you always want time values interpreted as "seconds since the epoch
58 # (not counting leap seconds)", use
60 # below. If you always want right time values interpreted as "seconds since
61 # the epoch" (counting leap seconds)", use
63 # below. If you want both sets of data available, with leap seconds not
64 # counted normally, use
66 # below. If you want both sets of data available, with leap seconds counted
70 # POSIX mandates that leap seconds not be counted; for compatibility with it,
71 # use either "posix_only" or "posix_right".
75 # Since "." may not be in PATH...
77 YEARISTYPE
= .
/yearistype
79 # Non-default libraries needed to link.
80 # Add -lintl if you want to use `gettext' on Solaris.
83 # Add the following to the end of the "CFLAGS=" line as needed.
84 # -Dconst= if `const' does not work (SunOS 4.x cc, OSF1 V5.0 cc)
85 # -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
86 # -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
87 # -DHAVE_INCOMPATIBLE_CTIME_R=1 if your system's time.h declares
88 # ctime_r and asctime_r incompatibly with the POSIX standard (Solaris 8).
89 # -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
90 # -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
91 # -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
92 # -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
93 # -DHAVE_STRERROR=0 if your system lacks the strerror function
94 # -DHAVE_SYMLINK=0 if your system lacks the symlink function
95 # -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h"
96 # -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
97 # -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
98 # -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
99 # -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
100 # -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
101 # DST transitions if the time zone files cannot be accessed
102 # -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
103 # -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
104 # the default is system-supplied, typically "/usr/lib/locale"
105 # $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
106 # -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
107 # if you do not want run time warnings about formats that may cause
109 # -DZIC_MAX_ABBR_LEN_WO_WARN=3
110 # (or some other number) to set the maximum time zone abbreviation length
111 # that zic will accept without a warning (the default is 6)
112 GCC_DEBUG_FLAGS
= -Dlint
-g
-O
-fno-common \
113 -Wall
-Wcast-qual
-Wconversion
-Wmissing-prototypes \
114 -Wnested-externs
-Wpointer-arith
-Wshadow \
115 -Wtraditional
# -Wstrict-prototypes -Wwrite-strings
117 # If you want to use System V compatibility code, add
119 # to the end of the "CFLAGS=" line. This arrange for "timezone" and "daylight"
120 # variables to be kept up-to-date by the time conversion functions. Neither
121 # "timezone" nor "daylight" is described in X3J11's work.
123 # If your system has a "GMT offset" field in its "struct tm"s
124 # (or if you decide to add such a field in your system's "time.h" file),
125 # add the name to a define such as
126 # -DTM_GMTOFF=tm_gmtoff
128 # -DTM_GMTOFF=_tm_gmtoff
129 # to the end of the "CFLAGS=" line.
130 # Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
131 # in its work, use of "tm_gmtoff" is described as non-conforming.
132 # Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
133 # their recent releases.
135 # If your system has a "zone abbreviation" field in its "struct tm"s
136 # (or if you decide to add such a field in your system's "time.h" file),
137 # add the name to a define such as
141 # to the end of the "CFLAGS=" line.
142 # Neither tm_zone nor _tm_zone is described in X3J11's work;
143 # in its work, use of "tm_zone" is described as non-conforming.
144 # Both UCB and Sun have done the equivalent of defining TM_ZONE in
145 # their recent releases.
147 # If you want functions that were inspired by early versions of X3J11's work,
150 # to the end of the "CFLAGS=" line. This arranges for the functions
151 # "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
152 # "posix2time", and "time2posix" to be added to the time conversion library.
153 # "tzsetwall" is like "tzset" except that it arranges for local wall clock
154 # time (rather than the time specified in the TZ environment variable)
156 # "offtime" is like "gmtime" except that it accepts a second (long) argument
157 # that gives an offset to add to the time_t when converting it.
158 # "timelocal" is equivalent to "mktime".
159 # "timegm" is like "timelocal" except that it turns a struct tm into
160 # a time_t using UTC (rather than local time as "timelocal" does).
161 # "timeoff" is like "timegm" except that it accepts a second (long) argument
162 # that gives an offset to use when converting to a time_t.
163 # "posix2time" and "time2posix" are described in an included manual page.
164 # X3J11's work does not describe any of these functions.
165 # Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
166 # These functions may well disappear in future releases of the time
167 # conversion package.
169 # If you want Source Code Control System ID's left out of object modules, add
171 # to the end of the "CFLAGS=" line.
173 # If you'll never want to handle solar-time-based time zones, add
175 # to the end of the "CFLAGS=" line
176 # (and comment out the "SDATA=" line below).
177 # This reduces (slightly) the run-time data-space requirements of
178 # the time conversion functions; it may reduce the acceptability of your system
179 # to folks in oil- and cash-rich places.
181 # If you want to allocate state structures in localtime, add
183 # to the end of the "CFLAGS=" line. Storage is obtained by calling malloc.
185 # If you want an "altzone" variable (a la System V Release 3.1), add
187 # to the end of the "CFLAGS=" line.
188 # This variable is not described in X3J11's work.
190 # If you want a "gtime" function (a la MACH), add
192 # to the end of the "CFLAGS=" line
193 # This function is not described in X3J11's work.
195 # NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
196 # out by the National Institute of Standards and Technology
197 # which claims to test C and Posix conformance. If you want to pass PCTS, add
199 # to the end of the "CFLAGS=" line.
201 # If you want strict compliance with XPG4 as of 1994-04-09, add
203 # to the end of the "CFLAGS=" line. This causes "strftime" to always return
204 # 53 as a week number (rather than 52 or 53) for those days in January that
205 # before the first Monday in January when a "%V" format is used and January 1
206 # falls on a Friday, Saturday, or Sunday.
208 CFLAGS
=-DHAVE_ADJTIME
=0 -D_POSIX_SOURCE
=1 -D_MINIX
=1
210 # If you want zic's -s option used when installing, uncomment the next line
214 ZIC
= $(zic
) $(ZFLAGS
)
216 # The name of a Posix-compliant `awk' on your system.
219 # The path where SGML DTDs are kept.
220 SGML_SEARCH_PATH
= $(TOPDIR
)/share
/doc
/sgml-lib
/REC-xhtml1-20000126
/
222 # The catalog file(s) to use when validating XHTML.
223 SGML_CATALOG_FILES
= xhtml.soc
225 # The name, arguments and environment of a program to validate your web pages.
226 # See <http://www.jclark.com/sp/> for a validator, and
227 # <http://validator.w3.org/source/> for a validation library.
229 VALIDATE_FLAGS
= -s
-B
-wall
-wno-unused-param
-wxml
231 SGML_CATALOG_FILES
=$(SGML_CATALOG_FILES
) \
232 SGML_SEARCH_PATH
=$(SGML_SEARCH_PATH
) \
233 SP_CHARSET_FIXED
=YES \
236 ###############################################################################
239 CC
= $(cc) -DTZDIR
=\"$(TZDIR
)\"
241 TZCSRCS
= zic.c scheck.c ialloc.c
242 TZCOBJS
= zic.o scheck.o ialloc.o
243 TZDSRCS
= zdump.c ialloc.c
244 TZDOBJS
= zdump.o ialloc.o
245 DATESRCS
= date.c logwtmp.c
246 DATEOBJS
= date.o logwtmp.o
249 HEADERS
= tzfile.h private.h
250 NONLIBSRCS
= zic.c zdump.c scheck.c ialloc.c
251 NEWUCBSRCS
= date.c logwtmp.c
252 SOURCES
= $(HEADERS
) $(LIBSRCS
) $(NONLIBSRCS
) $(NEWUCBSRCS
) tzselect.ksh
253 DOCS
= README Theory date
.1 Makefile
254 PRIMARY_YDATA
= africa antarctica asia australasia \
255 europe northamerica southamerica
256 YDATA
= $(PRIMARY_YDATA
) pacificnew etcetera factory backward
258 SDATA
= solar87 solar88 solar89
259 TDATA
= $(YDATA
) $(NDATA
) $(SDATA
)
260 TABDATA
= iso3166.tab zone.tab
261 DATA
= $(YDATA
) $(NDATA
) $(SDATA
) $(TABDATA
) leapseconds yearistype.sh
262 WEB_PAGES
= tz-art.htm tz-link.htm
263 MISC
= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
264 itca.jpg
$(WEB_PAGES
) checktab.awk workman.sh
265 ENCHILADA
= $(DOCS
) $(SOURCES
) $(DATA
) $(MISC
)
267 # And for the benefit of csh users on systems that assume the user
268 # shell should be used to handle commands in Makefiles. . .
272 all: tzselect zic zdump
$(LIBOBJS
)
276 install: ALL
$(DATA
) $(REDO
) $(TABDATA
)
277 $(ZIC
) -y
$(YEARISTYPE
) \
278 -d
$(TZDIR
) -l
$(LOCALTIME
) -p
$(POSIXRULES
)
279 -rm -f
$(TZDIR
)/iso3166.tab
$(TZDIR
)/zone.tab
280 install -m
644 iso3166.tab zone.tab
$(TZDIR
)/.
281 -mkdir
$(TOPDIR
) $(ETCDIR
) 2>/dev
/null
282 install -m
755 tzselect zic zdump
$(ETCDIR
)/.
283 -mkdir
$(TOPDIR
) 2>/dev
/null
284 install -m
755 date
/bin
286 INSTALL
: ALL
install date
.1
287 -mkdir
$(TOPDIR
) $(BINDIR
) 2>/dev
/null
289 -mkdir
$(TOPDIR
) 2>/dev
/null
292 $(CC
) $(CFLAGS
) $(LFLAGS
) $(TZDOBJS
) $(LDLIBS
) -o
$@
295 zic
: $(TZCOBJS
) yearistype
296 $(CC
) $(CFLAGS
) $(LFLAGS
) $(TZCOBJS
) $(LDLIBS
) -o
$@
299 yearistype
: yearistype.sh
300 cp yearistype.sh yearistype
303 posix_only
: zic
$(TDATA
)
304 $(ZIC
) -y
$(YEARISTYPE
) -d
$(TZDIR
) -L
/dev
/null
$(TDATA
)
306 right_only
: zic leapseconds
$(TDATA
)
307 $(ZIC
) -y
$(YEARISTYPE
) -d
$(TZDIR
) -L leapseconds
$(TDATA
)
309 # In earlier versions of this makefile, the other two directories were
310 # subdirectories of $(TZDIR). However, this led to configuration errors.
311 # For example, with posix_right under the earlier scheme,
312 # TZ='right/Australia/Adelaide' got you localtime with leap seconds,
313 # but gmtime without leap seconds, which led to problems with applications
314 # like sendmail that subtract gmtime from localtime.
315 # Therefore, the other two directories are now siblings of $(TZDIR).
316 # You must replace all of $(TZDIR) to switch from not using leap seconds
317 # to using them, or vice versa.
318 other_two
: zic leapseconds
$(TDATA
)
319 $(ZIC
) -y
$(YEARISTYPE
) -d
$(TZDIR
)-posix
-L
/dev
/null
$(TDATA
)
320 $(ZIC
) -y
$(YEARISTYPE
) \
321 -d
$(TZDIR
)-leaps
-L leapseconds
$(TDATA
)
323 posix_right
: posix_only other_two
325 right_posix
: right_only other_two
329 # We use the system's logwtmp in preference to ours if available.
331 date
: $(DATEOBJS
) logwtmp.o
332 $(CC
) $(CFLAGS
) date.o logwtmp.o \
335 tzselect
: tzselect.ksh
337 -e
's|AWK=[^}]*|AWK=$(AWK)|g' \
338 -e
's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
342 check: check_tables check_web
344 check_tables
: checktab.awk
$(PRIMARY_YDATA
)
345 $(AWK
) -f checktab.awk
$(PRIMARY_YDATA
)
347 check_web
: $(WEB_PAGES
)
348 $(VALIDATE_ENV
) $(VALIDATE
) $(VALIDATE_FLAGS
) $(WEB_PAGES
)
351 rm -f core
*.o
*.out tzselect zdump zic yearistype date
353 maintainer-clean
: clean
354 @echo
'This command is intended for maintainers to use; it'
355 @echo
'deletes files that may need special tools to rebuild.'
356 rm -f
*.
[1-8].txt tzcode.
tar.gz tzdata.
tar.gz
361 # The zics below ensure that each data file can stand on its own.
362 # We also do an all-files run to catch links to links.
365 make maintainer-clean
366 make
"CFLAGS=$(GCC_DEBUG_FLAGS)"
367 -mkdir
/tmp
/,tzpublic
2>/dev
/null
368 -for i in
$(TDATA
) ; do zic
-v
-d
/tmp
/,tzpublic
$$i 2>&1 | grep
-v
"starting year" ; done
369 for i in
$(TDATA
) ; do zic
-d
/tmp
/,tzpublic
$$i || exit
; done
370 zic
-v
-d
/tmp
/,tzpublic
$(TDATA
) || exit
371 rm -f
-r
/tmp
/,tzpublic
372 for i in
*.
[1-8] ; do sh workman.sh
$$i > $$i.txt || exit
; done
373 $(AWK
) -f checktab.awk
$(PRIMARY_YDATA
)
374 tar cf
- $(DOCS
) $(SOURCES
) $(MISC
) *.
[1-8].txt | gzip
-9 > tzcode.
tar.gz
375 tar cf
- $(DATA
) | gzip
-9 > tzdata.
tar.gz
379 for i in
"long long" unsigned double
; \
381 make CFLAGS
="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \
382 .
/zdump
-v Europe
/Rome
; \
387 @
$(AWK
) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA
)
390 difftime.o
: private.h
393 zic.o
: private.h tzfile.h