1986-01-13 17:26:56 -05:00
|
|
|
# %W%
|
|
|
|
|
|
1986-02-28 21:30:44 -05:00
|
|
|
# If you want something other than Eastern United States time used on your
|
1986-03-02 22:02:58 -05:00
|
|
|
# system, change the line below (after finding the zone you want in 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
|
1986-11-19 19:15:31 -05:00
|
|
|
# zic -l rightzone
|
1986-02-28 21:30:44 -05:00
|
|
|
|
1986-07-26 18:32:03 -04:00
|
|
|
LOCALTIME= US/Eastern
|
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).
|
|
|
|
|
# Alternately, if you discover you've got the wrong time zone, you can just
|
|
|
|
|
# zic -p rightzone
|
|
|
|
|
|
|
|
|
|
POSIXRULES= US/Eastern
|
|
|
|
|
|
1986-03-02 22:02:58 -05:00
|
|
|
# Use an absolute path name for TZDIR unless you're just testing the software.
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1986-11-15 20:20:29 -05:00
|
|
|
TZDIR= /etc/zoneinfo
|
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.
|
|
|
|
|
|
|
|
|
|
REDO= posix_right
|
|
|
|
|
|
1986-07-12 07:27:55 -04:00
|
|
|
# You may want to change this define if you're just testing the software.
|
1987-02-28 18:42:18 -05:00
|
|
|
# Alternatively, you can put these functions in /lib/libc.a, removing
|
1988-04-16 21:39:29 -04:00
|
|
|
# the old "ctime.o". This is the
|
1987-02-28 18:42:18 -05:00
|
|
|
# ideal solution if you are able. Build libz.a, extract the files, and
|
|
|
|
|
# then add them to libc.a.
|
1986-07-12 07:27:55 -04:00
|
|
|
|
1986-11-22 19:03:35 -05:00
|
|
|
TZLIB= /usr/lib/libz.a
|
1986-07-12 07:27:55 -04:00
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
# If you're running on a System V-style system and don't want lint grief,
|
|
|
|
|
# add
|
|
|
|
|
# -DUSG
|
|
|
|
|
# to the end of the "CFLAGS=" line.
|
|
|
|
|
#
|
1987-02-02 15:32:36 -05:00
|
|
|
# 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
|
|
|
#
|
1986-12-26 15:21:45 -05:00
|
|
|
# If you want to use System V compatibility code, add
|
|
|
|
|
# -DUSG_COMPAT
|
|
|
|
|
# to the end of the "CFLAGS=" line.
|
|
|
|
|
#
|
|
|
|
|
# If you want BSD compatibility code, add
|
|
|
|
|
# -DBSD_COMPAT
|
|
|
|
|
# to the end of the "CFLAGS=" line.
|
|
|
|
|
#
|
1989-02-07 13:08:06 -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.
|
|
|
|
|
#
|
|
|
|
|
# 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_ZONE=tm_zone
|
|
|
|
|
# or
|
|
|
|
|
# -DTM_ZONE=_tm_zone
|
|
|
|
|
# to the end of the "CFLAGS=" line.
|
1987-02-12 19:56:12 -05:00
|
|
|
#
|
|
|
|
|
# If you want code inspired by certain emerging standards, add
|
|
|
|
|
# -DSTD_INSPIRED
|
|
|
|
|
# to the end of the "CFLAGS=" line.
|
|
|
|
|
#
|
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).
|
1986-12-26 15:21:45 -05:00
|
|
|
|
|
|
|
|
CFLAGS=
|
1986-11-27 12:46:22 -05:00
|
|
|
|
|
|
|
|
# LINTFLAGS is set for 4.[123]BSD systems.
|
1986-12-26 15:21:45 -05:00
|
|
|
# If you're using System V, you'll want to comment out the "LINTFLAGS=" line.
|
1986-03-05 18:46:40 -05:00
|
|
|
|
1989-02-17 20:21:00 -05:00
|
|
|
LINT= lint
|
|
|
|
|
LINTFLAGS= -hbaxc
|
1986-03-05 18:46:40 -05:00
|
|
|
|
1988-01-25 10:14:15 -05:00
|
|
|
SHAR= shar
|
1987-02-28 18:42:18 -05:00
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
################################################################################
|
|
|
|
|
|
1986-12-31 15:56:04 -05:00
|
|
|
CC= cc -DTZDIR=\"$(TZDIR)\"
|
1986-01-16 08:50:41 -05:00
|
|
|
|
1988-02-18 04:31:21 -05:00
|
|
|
TZCSRCS= zic.c localtime.c asctime.c \
|
|
|
|
|
scheck.c ialloc.c emkdir.c getopt.c link.c
|
|
|
|
|
TZCOBJS= zic.o localtime.o asctime.o \
|
|
|
|
|
scheck.o ialloc.o emkdir.o getopt.o link.o
|
|
|
|
|
TZDSRCS= zdump.c localtime.c asctime.c \
|
|
|
|
|
ialloc.c getopt.c link.c
|
|
|
|
|
TZDOBJS= zdump.o localtime.o asctime.o \
|
|
|
|
|
ialloc.o getopt.o link.o
|
1989-02-24 18:51:56 -05:00
|
|
|
LIBSRCS= localtime.c asctime.c ctime.c dysize.c timemk.c difftime.c
|
|
|
|
|
LIBOBJS= localtime.o asctime.o ctime.o dysize.o timemk.o difftime.o
|
1989-02-17 20:21:00 -05:00
|
|
|
HEADERS= tzfile.h nonstd.h stdio.h stdlib.h time.h
|
|
|
|
|
NONLIBSRCS= zic.c zdump.c \
|
|
|
|
|
scheck.c ialloc.c emkdir.c getopt.c link.c
|
|
|
|
|
SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS)
|
1988-02-13 10:06:38 -05:00
|
|
|
DOCS= Patchlevel.h \
|
|
|
|
|
README Theory \
|
|
|
|
|
newctime.3 tzfile.5 zic.8 zdump.8 \
|
1989-02-17 20:21:00 -05:00
|
|
|
Makefile
|
1988-02-18 04:31:21 -05:00
|
|
|
YDATA= africa antarctica asia australasia \
|
|
|
|
|
europe northamerica southamerica pacificnew
|
|
|
|
|
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)
|
1988-02-18 04:31:21 -05:00
|
|
|
DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds
|
1989-02-17 20:21:00 -05:00
|
|
|
USNO= usno1988 usno1989
|
|
|
|
|
ENCHILADA= $(DOCS) $(SOURCES) $(DATA) $(USNO)
|
1986-01-16 08:50:41 -05:00
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
all: REDID_BINARIES zdump $(TZLIB)
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1989-02-04 18:30:06 -05:00
|
|
|
REDID_BINARIES: zic $(DATA) $(REDO)
|
1989-01-31 23:10:30 -05:00
|
|
|
./zic -d $(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES)
|
1988-02-18 04:31:21 -05:00
|
|
|
touch $@
|
1986-01-16 11:00:37 -05:00
|
|
|
|
1989-02-04 18:30:06 -05:00
|
|
|
posix_only:
|
|
|
|
|
./zic -d $(TZDIR) -L /dev/null $(TDATA)
|
|
|
|
|
|
|
|
|
|
right_only:
|
|
|
|
|
./zic -d $(TZDIR) -L leapseconds $(TDATA)
|
|
|
|
|
|
|
|
|
|
other_two:
|
|
|
|
|
./zic -d $(TZDIR)/posix -L /dev/null $(TDATA)
|
|
|
|
|
./zic -d $(TZDIR)/right -L leapseconds $(TDATA)
|
|
|
|
|
|
|
|
|
|
posix_right: posix_only other_two
|
|
|
|
|
|
|
|
|
|
right_posix: right_only other_two
|
|
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
zdump: $(TZDOBJS)
|
1986-12-31 15:56:04 -05:00
|
|
|
$(CC) $(CFLAGS) $(LFLAGS) $(TZDOBJS) -o $@
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1986-12-31 14:23:02 -05:00
|
|
|
$(TZLIB): $(LIBOBJS)
|
|
|
|
|
ar ru $@ $(LIBOBJS)
|
1989-02-17 20:21:00 -05:00
|
|
|
-ranlib $@
|
1986-07-12 07:27:55 -04:00
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
zic: $(TZCOBJS)
|
1986-12-31 15:56:04 -05:00
|
|
|
$(CC) $(CFLAGS) $(LFLAGS) $(TZCOBJS) -o $@
|
1986-01-21 09:11:47 -05:00
|
|
|
|
1989-02-17 20:21:00 -05:00
|
|
|
SHARS: SHAR1 SHAR2 SHAR3 SHAR4 SHAR5 SHAR6
|
1986-11-24 19:15:06 -05:00
|
|
|
|
1988-01-25 10:14:15 -05:00
|
|
|
SHAR1: $(DOCS)
|
|
|
|
|
$(SHAR) $(DOCS) > $@
|
1986-03-06 10:40:48 -05:00
|
|
|
|
1989-02-17 20:21:00 -05:00
|
|
|
SHAR2: $(HEADERS) $(LIBSRCS)
|
|
|
|
|
$(SHAR) $(HEADERS) $(LIBSRCS) > $@
|
|
|
|
|
|
|
|
|
|
SHAR3: $(NONLIBSRCS)
|
|
|
|
|
$(SHAR) $(NONLIBSRCS) > $@
|
|
|
|
|
|
|
|
|
|
SHAR4: $(YDATA) $(NDATA)
|
|
|
|
|
$(SHAR) $(YDATA) $(NDATA) > $@
|
1986-03-06 10:40:48 -05:00
|
|
|
|
1989-02-17 20:21:00 -05:00
|
|
|
SHAR5: $(SDATA)
|
|
|
|
|
$(SHAR) $(SDATA) > $@
|
|
|
|
|
|
|
|
|
|
SHAR6: $(USNO)
|
|
|
|
|
$(SHAR) $(USNO) > $@
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1988-01-25 12:00:40 -05:00
|
|
|
tz.shar.Z.uue: $(ENCHILADA)
|
|
|
|
|
$(SHAR) $(ENCHILADA) | compress | uuencode tz.shar.Z > $@
|
|
|
|
|
|
1988-02-27 19:15:58 -05:00
|
|
|
sure: $(SOURCES)
|
1989-02-17 20:21:00 -05:00
|
|
|
$(LINT) $(LINTFLAGS) $(CFLAGS) -DTZDIR=\"$(TZDIR)\" $(TZCSRCS)
|
|
|
|
|
$(LINT) $(LINTFLAGS) $(CFLAGS) -DTZDIR=\"$(TZDIR)\" $(TZDSRCS)
|
|
|
|
|
$(LINT) $(LINTFLAGS) $(CFLAGS) -DTZDIR=\"$(TZDIR)\" $(LIBSRCS)
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1989-02-17 20:21:00 -05:00
|
|
|
SURE: sure $(ENCHILADA)
|
|
|
|
|
make sure LINT=/usr/5bin/lint LINTFLAGS=""
|
|
|
|
|
spell $(ENCHILADA)
|
|
|
|
|
make clean
|
1989-02-20 18:44:19 -05:00
|
|
|
make sure LINT=gcc LINTFLAGS="-c -O -ansi -pedantic -Wall"
|
1989-02-17 20:21:00 -05:00
|
|
|
make clean
|
1988-02-27 19:15:58 -05:00
|
|
|
|
1986-01-13 17:26:56 -05:00
|
|
|
clean:
|
1988-01-25 12:42:37 -05:00
|
|
|
rm -f core *.o *.out REDID_BINARIES zdump zic \
|
|
|
|
|
SHAR* tz.shar.Z.uue ,*
|
1986-01-13 17:26:56 -05:00
|
|
|
|
1986-12-26 15:21:45 -05:00
|
|
|
CLEAN: clean
|
|
|
|
|
sccs clean
|
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
|
|
|
|
1988-02-27 19:15:58 -05:00
|
|
|
asctime.o: nonstd.h stdio.h time.h tzfile.h
|
|
|
|
|
ctime.o: nonstd.h time.h
|
|
|
|
|
dysize.o: tzfile.h
|
|
|
|
|
emkdir.o: nonstd.h stdlib.h
|
|
|
|
|
ialloc.o: nonstd.h stdlib.h
|
|
|
|
|
link.o: nonstd.h stdio.h
|
|
|
|
|
localtime.o: nonstd.h stdio.h stdlib.h time.h tzfile.h
|
|
|
|
|
scheck.o: nonstd.h stdio.h stdlib.h
|
|
|
|
|
zdump.o: nonstd.h stdio.h stdlib.h time.h tzfile.h
|
|
|
|
|
zic.o: nonstd.h stdio.h stdlib.h time.h tzfile.h
|
1989-02-17 20:21:00 -05:00
|
|
|
|
|
|
|
|
.KEEP_STATE:
|