Files
amiga-tz/Makefile
T

306 lines
10 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).
1989-03-21 20:05:59 -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
# times; the environment variable itself specifies GMT offsets of standard and
# 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.
1989-04-07 17:59:38 -04:00
# If you want POSIX compatibility, use "US/Eastern".
1989-01-31 23:10:30 -05:00
POSIXRULES= US/Eastern
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
TZLIB= $(LIBDIR)/libz.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
# 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
1989-04-07 17:59:38 -04:00
# If you're on an AT&T-based system (rather than a BSD-based system), add
# -DUSG
# to the end of the "CFLAGS=" line.
#
# If you're running on a system where "strchr" is known as "index"
1987-02-16 13:41:39 -05:00
# (for example, a 4.[012]BSD system), add
1987-02-02 15:32:36 -05:00
# -Dstrchr=index
1987-02-28 18:42:18 -05:00
# to the end of the "CFLAGS=" line.
1987-02-02 15:32:36 -05:00
#
1989-03-05 22:57:09 -05:00
# If you're running on a system with a "mkdir" function, feel free to add
1989-03-05 22:10:42 -05:00
# -Demkdir=mkdir
# to the end of the "CFLAGS=" line
#
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.
# Both UCB and Sun have done the equivalent of defining TM_GMTOFF in
# 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
# a time_t using GMT (rather than local time as "timelocal" does).
# "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.
1989-03-21 20:05:59 -05:00
# None of these functions are described in X3J11's current 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.
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
1986-12-26 15:21:45 -05:00
################################################################################
1986-12-31 15:56:04 -05:00
CC= cc -DTZDIR=\"$(TZDIR)\"
1986-01-13 17:26:56 -05:00
1989-03-22 20:00:34 -05:00
TZCSRCS= zic.c localtime.c asctime.c scheck.c ialloc.c emkdir.c getopt.c
TZCOBJS= zic.o localtime.o asctime.o scheck.o ialloc.o emkdir.o getopt.o
TZDSRCS= zdump.c localtime.c asctime.c ialloc.c getopt.c
TZDOBJS= zdump.o localtime.o asctime.o ialloc.o getopt.o
1989-03-20 17:24:43 -05:00
DATESRCS= date.c localtime.c getopt.c logwtmp.c strftime.c
1989-04-10 19:31:29 -04:00
DATEOBJS= date.o localtime.o getopt.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
1989-03-22 20:00:34 -05:00
NONLIBSRCS= zic.c zdump.c scheck.c ialloc.c emkdir.c getopt.c
1989-03-20 17:24:43 -05:00
NEWUCBSRCS= date.c logwtmp.c strftime.c
1993-05-25 13:45:27 -04:00
SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS)
1993-10-31 19:08:15 -05:00
MANS= newctime.3 newtzset.3 time2posix.3 tzfile.5 zic.8 zdump.8
1993-01-08 06:56:58 -05:00
DOCS= README Theory $(MANS) date.1 Makefile
1988-02-18 04:31:21 -05:00
YDATA= africa antarctica asia australasia \
1993-11-22 17:01:38 -05:00
europe northamerica southamerica 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)
1993-05-25 13:45:27 -04:00
DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds yearistype.sh
1994-02-07 09:53:31 -05:00
USNO= usno1988 usno1989 usno1989a
1989-02-17 20:21:00 -05:00
ENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(USNO)
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
1989-03-21 20:05:59 -05:00
ALL: all date
1989-03-07 22:22:17 -05:00
1989-03-22 20:00:34 -05:00
install: all $(DATA) $(REDO) $(TZLIB) $(MANS)
1992-06-15 16:24:49 -04:00
./zic -y $(YEARISTYPE) \
-d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
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 \
$(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/.
cp zdump.8 zic.8 $(MANDIR)/man8/.
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)
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
1992-03-15 22:02:43 -05:00
zic: $(TZCOBJS) yearistype
1989-03-21 20:05:59 -05:00
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -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)
1992-06-15 16:24:49 -04: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)
1992-06-15 16:24:49 -04:00
./zic -y $(YEARISTYPE) -d $(TZDIR) -L leapseconds $(TDATA)
1989-02-04 18:30:06 -05:00
1989-03-11 21:05:20 -05:00
other_two: zic leapseconds $(TDATA)
1992-06-15 16:24:49 -04:00
./zic -y $(YEARISTYPE) -d $(TZDIR)/posix -L /dev/null $(TDATA)
./zic -y $(YEARISTYPE) \
-d $(TZDIR)/right -L leapseconds $(TDATA)
1989-02-04 18:30:06 -05:00
posix_right: posix_only other_two
right_posix: right_only other_two
1989-04-07 17:59:38 -04:00
# The "ar d"s below ensure that obsolete object modules
# (based on source provided with earlier versions of the time conversion stuff)
# are removed from the library.
1989-03-07 22:22:17 -05:00
1986-12-31 14:23:02 -05:00
$(TZLIB): $(LIBOBJS)
1991-12-24 11:32:40 -05:00
-mkdir $(TOPDIR) $(LIBDIR)
1993-11-22 17:01:38 -05:00
sleep 3
1986-12-31 14:23:02 -05:00
ar ru $@ $(LIBOBJS)
1989-04-07 17:59:38 -04:00
if ar t $@ timemk.o 2>/dev/null ; then ar d $@ timemk.o ; fi
if ar t $@ ctime.o 2>/dev/null ; then ar d $@ ctime.o ; fi
if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
then ranlib $@ ; fi
1986-07-12 07:27:55 -04:00
1989-03-21 20:05:59 -05:00
# We use the system's logwtmp and strftime in preference to ours if available.
date: $(DATEOBJS)
ar r ,lib.a logwtmp.o strftime.o
1989-04-07 17:59:38 -04:00
if [ -x /usr/ucb/ranlib -o -x /usr/bin/ranlib ] ; \
then ranlib ,lib.a ; fi
1989-04-10 19:31:29 -04:00
$(CC) $(CFLAGS) date.o localtime.o asctime.o getopt.o \
-lc ,lib.a -o $@
1989-03-21 20:05:59 -05:00
rm -f ,lib.a
1986-01-21 09:11:47 -05:00
1986-01-13 17:26:56 -05:00
clean:
1994-02-07 10:04:30 -05:00
rm -f core *.o *.out 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
1993-01-08 06:51:58 -05:00
public: $(ENCHILADA)
1993-11-22 17:28:25 -05:00
tar cf - $(DOCS) $(SOURCES) $(USNO) | gzip -9 > tzcode.tar.gz
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
emkdir.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: