pci: don't do sanity check for missing pci bus, the check can misfire.
[minix.git] / commands / zoneinfo / Makefile
blob7ef9f7b912a7e1b8ff28bb5071df27a755700d5b
1 # @(#)Makefile 7.109
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
6 # zic -l rightzone
7 # to correct things.
8 # Use the command
9 # make zonenames
10 # to get a list of the values you can use for LOCALTIME.
12 LOCALTIME= GMT
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
21 # summer time.)
22 # Alternately, if you discover you've got the wrong time zone, you can just
23 # zic -p rightzone
24 # to correct things.
25 # Use the command
26 # make zonenames
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. . .
37 TOPDIR= /usr
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. . .
47 ETCDIR= $(TOPDIR)/bin
49 # If you "make INSTALL", the "date" command gets installed in. . .
51 BINDIR= $(TOPDIR)/bin
53 # Library functions are put in an archive in LIBDIR.
55 LIBDIR= $(TOPDIR)/lib
57 # If you always want time values interpreted as "seconds since the epoch
58 # (not counting leap seconds)", use
59 # REDO= posix_only
60 # below. If you always want right time values interpreted as "seconds since
61 # the epoch" (counting leap seconds)", use
62 # REDO= right_only
63 # below. If you want both sets of data available, with leap seconds not
64 # counted normally, use
65 # REDO= posix_right
66 # below. If you want both sets of data available, with leap seconds counted
67 # normally, use
68 # REDO= right_posix
69 # below.
70 # POSIX mandates that leap seconds not be counted; for compatibility with it,
71 # use either "posix_only" or "posix_right".
73 REDO= 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.
81 LDLIBS=
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
108 # year 2000 grief
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
118 # -DUSG_COMPAT
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
127 # or
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
138 # -DTM_ZONE=tm_zone
139 # or
140 # -DTM_ZONE=_tm_zone
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,
148 # add
149 # -DSTD_INSPIRED
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)
155 # to be used.
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
170 # -DNOID
171 # to the end of the "CFLAGS=" line.
173 # If you'll never want to handle solar-time-based time zones, add
174 # -DNOSOLAR
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
182 # -DALL_STATE
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
186 # -DALTZONE
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
191 # -DCMUCS
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
198 # -DPCTS
199 # to the end of the "CFLAGS=" line.
201 # If you want strict compliance with XPG4 as of 1994-04-09, add
202 # -DXPG4_1994_04_09
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
211 # ZFLAGS= -s
213 zic= ./zic
214 ZIC= $(zic) $(ZFLAGS)
216 # The name of a Posix-compliant `awk' on your system.
217 AWK= nawk
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.
228 VALIDATE = nsgmls
229 VALIDATE_FLAGS = -s -B -wall -wno-unused-param -wxml
230 VALIDATE_ENV = \
231 SGML_CATALOG_FILES=$(SGML_CATALOG_FILES) \
232 SGML_SEARCH_PATH=$(SGML_SEARCH_PATH) \
233 SP_CHARSET_FIXED=YES \
234 SP_ENCODING=UTF-8
236 ###############################################################################
238 cc= cc
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
247 LIBSRCS= difftime.c
248 LIBOBJS= difftime.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
257 NDATA= systemv
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. . .
270 SHELL= /bin/sh
272 all: tzselect zic zdump $(LIBOBJS)
274 ALL: all date
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
288 cp date $(BINDIR)/.
289 -mkdir $(TOPDIR) 2>/dev/null
291 zdump: $(TZDOBJS)
292 $(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
293 install -S768k $@
295 zic: $(TZCOBJS) yearistype
296 $(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
297 install -S1M $@
299 yearistype: yearistype.sh
300 cp yearistype.sh yearistype
301 chmod +x 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
327 zones: $(REDO)
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 \
333 $(LDLIBS) -o $@
335 tzselect: tzselect.ksh
336 sed \
337 -e 's|AWK=[^}]*|AWK=$(AWK)|g' \
338 -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
339 <$? >$@
340 chmod +x $@
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)
350 clean:
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
358 names:
359 @echo $(ENCHILADA)
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.
364 public: $(ENCHILADA)
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
377 typecheck:
378 make clean
379 for i in "long long" unsigned double; \
380 do \
381 make CFLAGS="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \
382 ./zdump -v Europe/Rome ; \
383 make clean ; \
384 done
386 zonenames: $(TDATA)
387 @$(AWK) '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
389 date.o: private.h
390 difftime.o: private.h
391 ialloc.o: private.h
392 scheck.o: private.h
393 zic.o: private.h tzfile.h
395 .KEEP_STATE: