Files
amiga-tz/Makefile
T

377 lines
13 KiB
Makefile
Raw Normal View History

1986-01-13 17:26:56 -05:00
# %W%
1989-03-05 13:12:47 -05:00
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
1986-03-02 22:02:58 -05:00
# Alternately, if you discover you've got the wrong time zone, you can just
1986-11-19 19:15:31 -05:00
# zic -l rightzone
1989-03-21 20:05:59 -05:00
# to correct things.
# Use the command
# make zonenames
# to get a list of the values you can use for LOCALTIME.
1986-02-28 21:30:44 -05:00
1989-03-09 15:08:25 -05:00
LOCALTIME= Factory
1986-02-28 21:30:44 -05:00
1989-01-31 23:10:30 -05:00
# If you want something other than Eastern United States time as a template
# for handling POSIX-style time zone environment variables,
# change the line below (after finding the zone you want in the
# time zone files, or adding it to a time zone file).
1995-12-21 12:31:40 -05:00
# (When a POSIX-style environment variable is handled, the rules in the
# template file are used to determine "spring forward" and "fall back" days and
1997-12-29 09:31:30 -05:00
# times; the environment variable itself specifies UTC offsets of standard and
1989-03-21 20:05:59 -05:00
# summer time.)
1989-01-31 23:10:30 -05:00
# Alternately, if you discover you've got the wrong time zone, you can just
# zic -p rightzone
1989-03-21 20:05:59 -05:00
# to correct things.
# Use the command
# make zonenames
# to get a list of the values you can use for POSIXRULES.
1994-02-24 14:14:24 -05:00
# If you want POSIX compatibility, use "America/New_York".
1989-01-31 23:10:30 -05:00
1994-02-24 14:14:24 -05:00
POSIXRULES= America/New_York
1989-01-31 23:10:30 -05:00
1999-09-20 16:35:22 -04:00
# Also see TZDEFRULESTRING below, which takes effect only
# if the time zone files cannot be accessed.
1989-03-21 20:05:59 -05:00
# Everything gets put in subdirectories of. . .
TOPDIR= /usr/local
# "Compiled" time zone information is placed in the "TZDIR" directory
# (and subdirectories).
1986-03-02 22:02:58 -05:00
# Use an absolute path name for TZDIR unless you're just testing the software.
1986-01-21 09:11:47 -05:00
1989-03-21 20:05:59 -05:00
TZDIR= $(TOPDIR)/etc/zoneinfo
# The "zic" and "zdump" commands get installed in. . .
ETCDIR= $(TOPDIR)/etc
# If you "make INSTALL", the "date" command gets installed in. . .
BINDIR= $(TOPDIR)/bin
# Manual pages go in subdirectories of. . .
MANDIR= $(TOPDIR)/man
# Library functions are put in an archive in LIBDIR.
LIBDIR= $(TOPDIR)/lib
1997-05-01 14:38:45 -04:00
TZLIB= $(LIBDIR)/libtz.a
1986-02-28 21:30:44 -05:00
1989-02-04 18:30:06 -05:00
# If you always want time values interpreted as "seconds since the epoch
# (not counting leap seconds)", use
1995-01-06 18:10:11 -05:00
# REDO= posix_only
1989-02-17 20:21:00 -05:00
# below. If you always want right time values interpreted as "seconds since
1989-02-04 18:30:06 -05:00
# the epoch" (counting leap seconds)", use
# REDO= right_only
# below. If you want both sets of data available, with leap seconds not
# counted normally, use
# REDO= posix_right
1989-02-17 20:21:00 -05:00
# below. If you want both sets of data available, with leap seconds counted
1989-02-04 18:30:06 -05:00
# normally, use
# REDO= right_posix
# below.
1989-03-21 20:05:59 -05:00
# POSIX mandates that leap seconds not be counted; for compatibility with it,
# use either "posix_only" or "posix_right".
1989-02-04 18:30:06 -05:00
REDO= posix_right
1992-06-15 16:24:49 -04:00
# Since "." may not be in PATH...
YEARISTYPE= ./yearistype
1996-02-21 15:47:19 -05:00
# Non-default libraries needed to link.
# Add -lintl if you want to use `gettext' on Solaris.
LDLIBS=
1995-01-03 11:08:17 -05:00
# Add the following to the end of the "CFLAGS=" line as needed.
# -DHAVE_ADJTIME=0 if `adjtime' does not exist (SVR0?)
1996-02-21 15:47:19 -05:00
# -DHAVE_GETTEXT=1 if `gettext' works (GNU, Linux, Solaris); also see LDLIBS
1995-01-03 11:08:17 -05:00
# -DHAVE_LONG_DOUBLE=1 if your compiler supports the `long double' type
# -DHAVE_SETTIMEOFDAY=0 if settimeofday does not exist (SVR0?)
# -DHAVE_SETTIMEOFDAY=1 if settimeofday has just 1 arg (SVR4)
# -DHAVE_SETTIMEOFDAY=2 if settimeofday uses 2nd arg (4.3BSD)
# -DHAVE_SETTIMEOFDAY=3 if settimeofday ignores 2nd arg (4.4BSD)
1996-02-21 15:52:03 -05:00
# -DHAVE_STRERROR=1 if `strerror' works
1998-01-31 13:52:40 -05:00
# -DHAVE_SYMLINK=0 if your system lacks the symlink function
1999-08-17 14:09:02 -04:00
# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
1995-01-03 11:08:17 -05:00
# -DLOCALE_HOME=\"path\" if locales are in "path", not "/usr/lib/locale"
1995-12-21 12:31:40 -05:00
# -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
1996-01-10 16:46:38 -05:00
# -DHAVE_UTMPX_H=1 if your compiler has a "utmpx.h"
1999-09-20 16:35:22 -04:00
# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified
# DST transitions if the time zone files cannot be accessed
1996-02-21 15:47:19 -05:00
# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz"
# -TTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory;
# the default is system-supplied, typically "/usr/lib/locale"
1995-01-03 11:08:17 -05:00
# $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking
1996-09-08 16:17:30 -04:00
# -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
# if you do not want run time warnings about formats that may cause
# year 2000 grief
1989-04-07 17:59:38 -04:00
#
1995-01-03 11:08:17 -05:00
GCC_DEBUG_FLAGS = -Dlint -g -O -fno-common \
-Wall -Wcast-qual -Wconversion -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith -Wshadow \
-Wtraditional # -Wstrict-prototypes -Wwrite-strings
1989-03-05 22:10:42 -05:00
#
1986-12-26 15:21:45 -05:00
# If you want to use System V compatibility code, add
# -DUSG_COMPAT
1989-03-21 20:05:59 -05:00
# to the end of the "CFLAGS=" line. This arrange for "timezone" and "daylight"
# variables to be kept up-to-date by the time conversion functions. Neither
# "timezone" nor "daylight" is described in X3J11's work.
1986-12-26 15:21:45 -05:00
#
# If your system has a "GMT offset" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
# -DTM_GMTOFF=tm_gmtoff
# or
# -DTM_GMTOFF=_tm_gmtoff
# to the end of the "CFLAGS=" line.
1989-03-21 20:05:59 -05:00
# Neither tm_gmtoff nor _tm_gmtoff is described in X3J11's work;
# in its work, use of "tm_gmtoff" is described as non-conforming.
1997-12-29 09:31:30 -05:00
# Both Linux and BSD have done the equivalent of defining TM_GMTOFF in
1989-03-21 20:05:59 -05:00
# their recent releases.
#
1989-04-10 18:36:22 -04:00
# If your system has a "zone abbreviation" field in its "struct tm"s
# (or if you decide to add such a field in your system's "time.h" file),
# add the name to a define such as
# -DTM_ZONE=tm_zone
# or
# -DTM_ZONE=_tm_zone
# to the end of the "CFLAGS=" line.
1989-03-21 20:05:59 -05:00
# Neither tm_zone nor _tm_zone is described in X3J11's work;
# in its work, use of "tm_zone" is described as non-conforming.
# Both UCB and Sun have done the equivalent of defining TM_ZONE in
# their recent releases.
1987-02-12 19:56:12 -05:00
#
1989-03-21 20:05:59 -05:00
# If you want functions that were inspired by early versions of X3J11's work,
# add
1987-02-12 19:56:12 -05:00
# -DSTD_INSPIRED
1989-03-22 20:00:34 -05:00
# to the end of the "CFLAGS=" line. This arranges for the functions
1993-10-31 18:48:25 -05:00
# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
# "posix2time", and "time2posix" to be added to the time conversion library.
1989-03-22 20:00:34 -05:00
# "tzsetwall" is like "tzset" except that it arranges for local wall clock
# time (rather than the time specified in the TZ environment variable)
# to be used.
1989-03-21 20:05:59 -05:00
# "offtime" is like "gmtime" except that it accepts a second (long) argument
# that gives an offset to add to the time_t when converting it.
# "timelocal" is equivalent to "mktime".
# "timegm" is like "timelocal" except that it turns a struct tm into
1997-12-29 09:31:30 -05:00
# a time_t using UTC (rather than local time as "timelocal" does).
1989-03-21 20:05:59 -05:00
# "timeoff" is like "timegm" except that it accepts a second (long) argument
# that gives an offset to use when converting to a time_t.
1993-10-31 18:48:25 -05:00
# "posix2time" and "time2posix" are described in an included manual page.
1999-09-20 16:36:22 -04:00
# None of these functions are described in X3J11's work.
1989-03-22 20:00:34 -05:00
# Sun has provided "tzsetwall", "timelocal", and "timegm" in SunOS 4.0.
1989-03-21 20:05:59 -05:00
# These functions may well disappear in future releases of the time
# conversion package.
1987-02-12 19:56:12 -05:00
#
1986-12-26 15:21:45 -05:00
# If you want Source Code Control System ID's left out of object modules, add
# -DNOID
# to the end of the "CFLAGS=" line.
#
1987-02-08 17:59:44 -05:00
# If you'll never want to handle solar-time-based time zones, add
# -DNOSOLAR
1987-02-12 19:56:12 -05:00
# to the end of the "CFLAGS=" line
1988-02-18 04:31:21 -05:00
# (and comment out the "SDATA=" line below).
1989-03-21 20:05:59 -05:00
# This reduces (slightly) the run-time data-space requirements of
# the time conversion functions; it may reduce the acceptability of your system
# to folks in oil- and cash-rich places.
1989-02-26 15:28:37 -05:00
#
# If you want to allocate state structures in localtime, add
# -DALL_STATE
1989-03-21 20:05:59 -05:00
# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc.
1989-02-26 15:28:37 -05:00
#
# If you want an "altzone" variable (a la System V Release 3.1), add
# -DALTZONE
# to the end of the "CFLAGS=" line.
1989-03-21 20:05:59 -05:00
# This variable is not described in X3J11's work.
1989-02-27 10:06:50 -05:00
#
# If you want a "gtime" function (a la MACH), add
# -DCMUCS
# to the end of the "CFLAGS=" line
1989-03-21 20:05:59 -05:00
# This function is not described in X3J11's work.
1994-03-29 07:31:43 -05:00
#
1994-03-30 23:15:22 -05:00
# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put
# out by the National Institute of Standards and Technology
# which claims to test C and Posix conformance. If you want to pass PCTS, add
1994-03-29 07:31:43 -05:00
# -DPCTS
# to the end of the "CFLAGS=" line.
1994-04-09 20:33:20 -04:00
#
1996-09-08 19:56:42 -04:00
# If you want strict compliance with XPG4 as of 1994-04-09, add
1994-04-09 20:33:20 -04:00
# -DXPG4_1994_04_09
# to the end of the "CFLAGS=" line. This causes "strftime" to always return
# 53 as a week number (rather than 52 or 53) for those days in January that
# before the first Monday in January when a "%V" format is used and January 1
# falls on a Friday, Saturday, or Sunday.
1986-11-27 12:46:22 -05:00
1986-12-26 15:21:45 -05:00
CFLAGS=
1986-11-27 12:46:22 -05:00
1997-03-03 18:27:59 -05:00
# If you want zic's -s option used when installing, uncomment the next line
# ZFLAGS= -s
1997-03-04 10:03:59 -05:00
zic= ./zic
ZIC= $(zic) $(ZFLAGS)
1997-03-03 18:27:59 -05:00
1996-09-08 15:51:04 -04:00
# The name of a Posix-compliant `awk' on your system.
AWK= awk
1995-12-21 12:31:40 -05:00
###############################################################################
1986-12-26 15:21:45 -05:00
1995-01-02 12:15:47 -05:00
cc= cc
CC= $(cc) -DTZDIR=\"$(TZDIR)\"
1986-01-13 17:26:56 -05:00
1995-01-06 18:10:11 -05:00
TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c
TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o
TZDSRCS= zdump.c localtime.c asctime.c ialloc.c
TZDOBJS= zdump.o localtime.o asctime.o ialloc.o
DATESRCS= date.c localtime.c logwtmp.c strftime.c asctime.c
DATEOBJS= date.o localtime.o logwtmp.o strftime.o asctime.o
1989-03-07 22:22:17 -05:00
LIBSRCS= localtime.c asctime.c difftime.c
LIBOBJS= localtime.o asctime.o difftime.o
1989-03-21 11:36:47 -05:00
HEADERS= tzfile.h private.h
1995-01-06 18:10:11 -05:00
NONLIBSRCS= zic.c zdump.c scheck.c ialloc.c
1989-03-20 17:24:43 -05:00
NEWUCBSRCS= date.c logwtmp.c strftime.c
1996-09-08 17:03:58 -04:00
SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) tzselect.ksh
1996-01-04 12:40:31 -05:00
MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \
1996-09-08 15:51:04 -04:00
tzfile.5 tzselect.8 zic.8 zdump.8
1993-01-08 06:56:58 -05:00
DOCS= README Theory $(MANS) date.1 Makefile
1996-09-08 15:51:04 -04:00
PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
YDATA= $(PRIMARY_YDATA) pacificnew etcetera factory backward
1988-02-18 04:31:21 -05:00
NDATA= systemv
1989-01-28 21:07:46 -05:00
SDATA= solar87 solar88 solar89
1989-02-04 18:30:06 -05:00
TDATA= $(YDATA) $(NDATA) $(SDATA)
1996-09-08 16:01:50 -04:00
TABDATA= iso3166.tab zone.tab
DATA= $(YDATA) $(NDATA) $(SDATA) $(TABDATA) leapseconds yearistype.sh
1998-05-28 09:53:12 -04:00
MISC= usno1988 usno1989 usno1989a usno1995 usno1997 usno1998 \
1997-07-17 20:37:39 -04:00
Arts.htm WWW.htm gccdiffs checktab.awk
1995-09-14 11:14:43 -04:00
ENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(MISC)
1986-01-13 17:26:56 -05:00
1989-05-13 14:43:20 -04:00
# And for the benefit of csh users on systems that assume the user
# shell should be used to handle commands in Makefiles. . .
SHELL= /bin/sh
1989-03-21 20:05:59 -05:00
all: zic zdump $(LIBOBJS)
1986-01-13 17:26:56 -05:00
1996-09-08 15:51:04 -04:00
ALL: all date tzselect
1989-03-07 22:22:17 -05:00
1996-09-08 16:01:50 -04:00
install: all $(DATA) $(REDO) $(TZLIB) $(MANS) $(TABDATA)
1997-03-03 18:27:59 -05:00
$(ZIC) -y $(YEARISTYPE) \
1992-06-15 16:24:49 -04:00
-d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
1996-09-08 15:51:04 -04:00
-rm -f $(TZDIR)/iso3166.tab $(TZDIR)/zone.tab
cp iso3166.tab zone.tab $(TZDIR)/.
1989-03-21 20:05:59 -05:00
-mkdir $(TOPDIR) $(ETCDIR)
cp zic zdump $(ETCDIR)/.
-mkdir $(TOPDIR) $(MANDIR) \
$(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
1989-03-22 20:00:34 -05:00
-rm -f $(MANDIR)/man3/newctime.3 \
1991-01-17 19:06:17 -05:00
$(MANDIR)/man3/newtzset.3 \
1989-03-22 20:00:34 -05:00
$(MANDIR)/man5/tzfile.5 \
1996-09-08 15:51:04 -04:00
$(MANDIR)/man8/tzselect.8 \
1989-03-22 20:00:34 -05:00
$(MANDIR)/man8/zdump.8 \
$(MANDIR)/man8/zic.8
1991-01-17 19:06:17 -05:00
cp newctime.3 newtzset.3 $(MANDIR)/man3/.
1989-03-21 20:05:59 -05:00
cp tzfile.5 $(MANDIR)/man5/.
1996-09-08 15:51:04 -04:00
cp tzselect.8 zdump.8 zic.8 $(MANDIR)/man8/.
1989-03-21 20:05:59 -05:00
1989-03-22 20:00:34 -05:00
INSTALL: ALL install date.1
1989-03-21 20:05:59 -05:00
-mkdir $(TOPDIR) $(BINDIR)
cp date $(BINDIR)/.
-mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1
1989-03-22 20:00:34 -05:00
-rm -f $(MANDIR)/man1/date.1
1989-03-21 20:05:59 -05:00
cp date.1 $(MANDIR)/man1/.
zdump: $(TZDOBJS)
1996-02-21 15:47:19 -05:00
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) $(LDLIBS) -o $@
1989-03-21 20:05:59 -05:00
1992-03-15 22:02:43 -05:00
zic: $(TZCOBJS) yearistype
1996-02-21 15:47:19 -05:00
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) $(LDLIBS) -o $@
1986-01-16 11:00:37 -05:00
1992-03-15 22:02:43 -05:00
yearistype: yearistype.sh
cp yearistype.sh yearistype
chmod +x yearistype
1989-03-11 21:05:20 -05:00
posix_only: zic $(TDATA)
1997-03-03 18:27:59 -05:00
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L /dev/null $(TDATA)
1989-02-04 18:30:06 -05:00
1989-03-11 21:05:20 -05:00
right_only: zic leapseconds $(TDATA)
1997-03-03 18:27:59 -05:00
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA)
1989-02-04 18:30:06 -05:00
1998-05-25 13:04:43 -04:00
# In earlier versions of this makefile, the other two directories were
# subdirectories of $(TZDIR). However, this led to configuration errors.
# For example, with posix_right under the earlier scheme,
# TZ='right/Australia/Adelaide' got you localtime with leap seconds,
# but gmtime without leap seconds, which led to problems with applications
# like sendmail that subtract gmtime from localtime.
# Therefore, the other two directories are now siblings of $(TZDIR).
# You must replace all of $(TZDIR) to switch from not using leap seconds
# to using them, or vice versa.
1989-03-11 21:05:20 -05:00
other_two: zic leapseconds $(TDATA)
1998-05-25 13:04:43 -04:00
$(ZIC) -y $(YEARISTYPE) -d $(TZDIR)-posix -L /dev/null $(TDATA)
1997-03-03 18:27:59 -05:00
$(ZIC) -y $(YEARISTYPE) \
1998-05-28 09:53:12 -04:00
-d $(TZDIR)-leaps -L leapseconds $(TDATA)
1989-02-04 18:30:06 -05:00
posix_right: posix_only other_two
right_posix: right_only other_two
1997-12-11 12:50:00 -05:00
zones: $(REDO)
1986-12-31 14:23:02 -05:00
$(TZLIB): $(LIBOBJS)
1991-12-24 11:32:40 -05:00
-mkdir $(TOPDIR) $(LIBDIR)
1986-12-31 14:23:02 -05:00
ar ru $@ $(LIBOBJS)
1989-04-07 17:59:38 -04:00
if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
then ranlib $@ ; fi
1986-07-12 07:27:55 -04:00
1995-01-06 18:10:11 -05:00
# We use the system's logwtmp in preference to ours if available.
1989-03-21 20:05:59 -05:00
date: $(DATEOBJS)
1995-01-06 18:10:11 -05:00
ar r ,lib.a logwtmp.o
1989-04-07 17:59:38 -04:00
if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
then ranlib ,lib.a ; fi
$(CC) $(CFLAGS) date.o localtime.o asctime.o strftime.o \
1996-02-21 15:47:19 -05:00
$(LDLIBS) -lc ,lib.a -o $@
1989-03-21 20:05:59 -05:00
rm -f ,lib.a
1986-01-21 09:11:47 -05:00
1996-09-08 15:51:04 -04:00
tzselect: tzselect.ksh
sed \
-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
<$? >$@
chmod +x $@
check_tables: checktab.awk $(PRIMARY_YDATA)
$(AWK) -f checktab.awk $(PRIMARY_YDATA)
1986-01-13 17:26:56 -05:00
clean:
1996-09-08 15:51:04 -04:00
rm -f core *.o *.out tzselect zdump zic yearistype date \
,* *.tar.gz
1986-01-13 17:26:56 -05:00
1988-02-13 10:06:38 -05:00
names:
@echo $(ENCHILADA)
1986-11-24 16:39:58 -05:00
1999-03-29 11:18:12 -05:00
# The zics below ensure that each data file can stand on its own.
public: $(ENCHILADA) zic
-mkdir /tmp/,tzpublic
for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i ; done
rm -f -r /tmp/,tzpublic
1995-09-14 11:14:43 -04:00
tar cf - $(DOCS) $(SOURCES) $(MISC) | gzip -9 > tzcode.tar.gz
1993-11-22 17:28:25 -05:00
tar cf - $(DATA) | gzip -9 > tzdata.tar.gz
1993-01-08 06:51:58 -05:00
1989-03-21 11:36:47 -05:00
zonenames: $(TDATA)
@awk '/^Zone/ { print $$2 } /^Link/ { print $$3 }' $(TDATA)
asctime.o: private.h tzfile.h
1989-03-22 20:00:34 -05:00
date.o: private.h
1989-03-21 11:36:47 -05:00
difftime.o: private.h
ialloc.o: private.h
localtime.o: private.h tzfile.h
scheck.o: private.h
1989-03-22 20:00:34 -05:00
strftime.o: tzfile.h
1989-03-21 11:36:47 -05:00
zic.o: private.h tzfile.h
1989-02-17 20:21:00 -05:00
.KEEP_STATE: