mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-03-21 03:08:57 +00:00
Berkeley mods
SCCS-file: Makefile SCCS-SID: 4.35
This commit is contained in:
committed by
Paul Eggert
parent
a3e591a8b8
commit
974585a721
134
Makefile
134
Makefile
@ -4,6 +4,10 @@
|
||||
# the time zone files, or adding it to a time zone file).
|
||||
# Alternately, if you discover you've got the wrong time zone, you can just
|
||||
# zic -l rightzone
|
||||
# to correct things.
|
||||
# Use the command
|
||||
# make zonenames
|
||||
# to get a list of the values you can use for LOCALTIME.
|
||||
|
||||
LOCALTIME= Factory
|
||||
|
||||
@ -11,14 +15,49 @@ LOCALTIME= Factory
|
||||
# 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).
|
||||
# (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.)
|
||||
# Alternately, if you discover you've got the wrong time zone, you can just
|
||||
# zic -p rightzone
|
||||
# to correct things.
|
||||
# Use the command
|
||||
# make zonenames
|
||||
# to get a list of the values you can use for POSIXRULES.
|
||||
|
||||
POSIXRULES= US/Eastern
|
||||
|
||||
# Everything gets put in subdirectories of. . .
|
||||
|
||||
TOPDIR= /usr/local
|
||||
|
||||
# "Compiled" time zone information is placed in the "TZDIR" directory
|
||||
# (and subdirectories).
|
||||
# Use an absolute path name for TZDIR unless you're just testing the software.
|
||||
|
||||
TZDIR= /etc/zoneinfo
|
||||
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.
|
||||
# You can set TZLIB to "/lib/libc.a" to completely replace your "old" time
|
||||
# conversion software; before doing so, be sure to both test things and
|
||||
# ensure that everything provided by the software your vendor's original
|
||||
# software is provided by the new functions.
|
||||
|
||||
LIBDIR= $(TOPDIR)/lib
|
||||
TZLIB= $(LIBDIR)/libz.a
|
||||
|
||||
# If you always want time values interpreted as "seconds since the epoch
|
||||
# (not counting leap seconds)", use
|
||||
@ -33,17 +72,11 @@ TZDIR= /etc/zoneinfo
|
||||
# normally, use
|
||||
# REDO= right_posix
|
||||
# below.
|
||||
# POSIX mandates that leap seconds not be counted; for compatibility with it,
|
||||
# use either "posix_only" or "posix_right".
|
||||
|
||||
REDO= posix_right
|
||||
|
||||
# You may want to change this define if you're just testing the software.
|
||||
# Alternatively, you can put these functions in /lib/libc.a, removing
|
||||
# the old "ctime.o". This is the
|
||||
# ideal solution if you are able. Build libz.a, extract the files, and
|
||||
# then add them to libc.a.
|
||||
|
||||
TZLIB= /usr/lib/libz.a
|
||||
|
||||
# If you're running on a system where "strchr" is known as "index",
|
||||
# (for example, a 4.[012]BSD system), add
|
||||
# -Dstrchr=index
|
||||
@ -55,7 +88,9 @@ TZLIB= /usr/lib/libz.a
|
||||
#
|
||||
# If you want to use System V compatibility code, add
|
||||
# -DUSG_COMPAT
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# 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.
|
||||
#
|
||||
# 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),
|
||||
@ -64,6 +99,10 @@ TZLIB= /usr/lib/libz.a
|
||||
# or
|
||||
# -DTM_GMTOFF=_tm_gmtoff
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# 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.
|
||||
#
|
||||
# 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),
|
||||
@ -72,10 +111,28 @@ TZLIB= /usr/lib/libz.a
|
||||
# or
|
||||
# -DTM_ZONE=_tm_zone
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# 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.
|
||||
#
|
||||
# If you want code inspired by certain emerging standards, add
|
||||
# If you want functions that were inspired by early versions of X3J11's work,
|
||||
# add
|
||||
# -DSTD_INSPIRED
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# to the end of the "CFLAGS=" line. This arranges for the functions "offtime",
|
||||
# "timelocal", "timegm", and "timeoff" to be added to the
|
||||
# time conversion library.
|
||||
# "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.
|
||||
# None of these functions are described in X3J11's current work.
|
||||
# Sun has provided "timelocal" and "timegm" in SunOS 4.0.
|
||||
# These functions may well disappear in future releases of the time
|
||||
# conversion package.
|
||||
#
|
||||
# If you want Source Code Control System ID's left out of object modules, add
|
||||
# -DNOID
|
||||
@ -85,18 +142,23 @@ TZLIB= /usr/lib/libz.a
|
||||
# -DNOSOLAR
|
||||
# to the end of the "CFLAGS=" line
|
||||
# (and comment out the "SDATA=" line below).
|
||||
# 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.
|
||||
#
|
||||
# If you want to allocate state structures in localtime, add
|
||||
# -DALL_STATE
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc.
|
||||
#
|
||||
# If you want an "altzone" variable (a la System V Release 3.1), add
|
||||
# -DALTZONE
|
||||
# to the end of the "CFLAGS=" line.
|
||||
# This variable is not described in X3J11's work.
|
||||
#
|
||||
# If you want a "gtime" function (a la MACH), add
|
||||
# -DCMUCS
|
||||
# to the end of the "CFLAGS=" line
|
||||
# This function is not described in X3J11's work.
|
||||
|
||||
CFLAGS=
|
||||
|
||||
@ -133,19 +195,31 @@ DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds
|
||||
USNO= usno1988 usno1989
|
||||
ENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(USNO)
|
||||
|
||||
all: REDID_BINARIES zdump date $(TZLIB)
|
||||
all: zic zdump $(LIBOBJS)
|
||||
|
||||
# We want to use system's logwtmp in preference to ours if available.
|
||||
ALL: all date
|
||||
|
||||
date: $(DATEOBJS)
|
||||
ar r ,lib.a logwtmp.o strftime.o
|
||||
-ranlib ,lib.a
|
||||
$(CC) $(CFLAGS) date.o localtime.o getopt.o -lc ,lib.a -o $@
|
||||
rm -f ,lib.a
|
||||
|
||||
REDID_BINARIES: zic $(DATA) $(REDO)
|
||||
install: all $(DATA) $(REDO) $(TZLIB)
|
||||
./zic -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
|
||||
touch $@
|
||||
-mkdir $(TOPDIR) $(ETCDIR)
|
||||
cp zic zdump $(ETCDIR)/.
|
||||
-mkdir $(TOPDIR) $(MANDIR) \
|
||||
$(MANDIR)/man3 $(MANDIR)/man5 $(MANDIR)/man8
|
||||
cp newctime.3 $(MANDIR)/man3/.
|
||||
cp tzfile.5 $(MANDIR)/man5/.
|
||||
cp zdump.8 zic.8 $(MANDIR)/man8/.
|
||||
|
||||
INSTALL: install date
|
||||
-mkdir $(TOPDIR) $(BINDIR)
|
||||
cp date $(BINDIR)/.
|
||||
-mkdir $(TOPDIR) $(MANDIR) $(MANDIR)/man1
|
||||
cp date.1 $(MANDIR)/man1/.
|
||||
|
||||
zdump: $(TZDOBJS)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
|
||||
|
||||
zic: $(TZCOBJS)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -o $@
|
||||
|
||||
posix_only: zic $(TDATA)
|
||||
./zic -d $(TZDIR) -L /dev/null $(TDATA)
|
||||
@ -161,9 +235,6 @@ posix_right: posix_only other_two
|
||||
|
||||
right_posix: right_only other_two
|
||||
|
||||
zdump: $(TZDOBJS)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
|
||||
|
||||
# The "ar d" command below ensures that obsolete object files are eliminated
|
||||
# from the library.
|
||||
|
||||
@ -172,11 +243,16 @@ $(TZLIB): $(LIBOBJS)
|
||||
-ar d $@ timemk.o ctime.o
|
||||
-ranlib $@
|
||||
|
||||
zic: $(TZCOBJS)
|
||||
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -o $@
|
||||
# We use the system's logwtmp and strftime in preference to ours if available.
|
||||
|
||||
date: $(DATEOBJS)
|
||||
ar r ,lib.a logwtmp.o strftime.o
|
||||
-ranlib ,lib.a
|
||||
$(CC) $(CFLAGS) date.o localtime.o getopt.o -lc ,lib.a -o $@
|
||||
rm -f ,lib.a
|
||||
|
||||
clean:
|
||||
rm -f core *.o *.out REDID_BINARIES zdump zic date ,*
|
||||
rm -f core *.o *.out zdump zic date ,*
|
||||
|
||||
names:
|
||||
@echo $(ENCHILADA)
|
||||
|
||||
Reference in New Issue
Block a user