2002-12-23 09:52:48 +03:00
|
|
|
# $NetBSD: Makefile,v 1.32 2002/12/23 06:52:51 lukem Exp $
|
1999-02-13 05:54:17 +03:00
|
|
|
|
2001-12-12 15:24:19 +03:00
|
|
|
.include <bsd.own.mk>
|
1993-03-21 12:45:37 +03: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).
|
|
|
|
# Alternately, if you discover you've got the wrong time zone, you can just
|
|
|
|
# zic -l rightzone
|
|
|
|
|
|
|
|
# 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/Pacific
|
|
|
|
|
|
|
|
# Use an absolute path name for TZDIR unless you're just testing the software.
|
2002-12-23 09:52:48 +03:00
|
|
|
# Note: ${DESTDIR} is prepended to this for the actual copy.
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2002-12-23 09:52:48 +03:00
|
|
|
TZDIR= /usr/share/zoneinfo
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
# If you always want time values interpreted as "seconds since the epoch
|
|
|
|
# (not counting leap seconds)", use
|
|
|
|
# REDO= posix_only
|
|
|
|
# below. If you always want right time values interpreted as "seconds since
|
|
|
|
# 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
|
|
|
|
# below. If you want both sets of data available, with leap seconds counted
|
|
|
|
# normally, use
|
|
|
|
# REDO= right_posix
|
|
|
|
# below.
|
|
|
|
|
1993-09-02 05:10:03 +04:00
|
|
|
REDO= posix_only
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1995-03-11 04:27:43 +03:00
|
|
|
# Since "." may not be in PATH...
|
1997-06-18 05:27:43 +04:00
|
|
|
YEARISTYPE= "sh ${.CURDIR}/yearistype.sh"
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1995-03-11 04:27:43 +03:00
|
|
|
YDATA= africa antarctica asia australasia \
|
|
|
|
europe northamerica southamerica pacificnew etcetera factory \
|
|
|
|
backward
|
|
|
|
NDATA= systemv
|
|
|
|
SDATA= solar87 solar88 solar89
|
|
|
|
TDATA= $(YDATA) $(NDATA) $(SDATA)
|
|
|
|
DATA= $(YDATA) $(NDATA) $(SDATA) leapseconds # yearistype.sh
|
|
|
|
USNO= usno1988 usno1989
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2002-12-19 13:56:39 +03:00
|
|
|
ZIC?= zic
|
|
|
|
|
|
|
|
TZBUILDDIR= ${.OBJDIR}/builddir
|
|
|
|
TZBUILDSPEC= ${.OBJDIR}/builddir.spec
|
1993-12-28 15:03:24 +03:00
|
|
|
|
1997-05-07 13:43:32 +04:00
|
|
|
.PHONY: posix_only
|
1993-03-21 12:45:37 +03:00
|
|
|
posix_only: ${TDATA}
|
2002-12-19 13:56:39 +03:00
|
|
|
mkdir -p ${TZBUILDDIR}
|
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR} -L /dev/null ${TDATA}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2001-11-26 18:24:20 +03:00
|
|
|
.PHONY: right_only
|
|
|
|
right_only: leapseconds ${TDATA}
|
2002-12-19 13:56:39 +03:00
|
|
|
mkdir -p ${TZBUILDDIR}
|
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR} -L leapseconds ${TDATA}
|
2001-11-26 18:24:20 +03:00
|
|
|
|
|
|
|
.PHONY: other_two
|
|
|
|
other_two: leapseconds ${TDATA}
|
2002-12-19 13:56:39 +03:00
|
|
|
mkdir -p ${TZBUILDDIR}
|
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR}/posix -L /dev/null ${TDATA}
|
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR}/right -L leapseconds ${TDATA}
|
2001-11-26 18:24:20 +03:00
|
|
|
|
|
|
|
.PHONY: posix_right
|
|
|
|
posix_right: posix_only other_two
|
|
|
|
|
|
|
|
.PHONY: right_posix
|
|
|
|
right_posix: right_only other_two
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
.if ${MKSHARE} != "no"
|
1997-05-07 20:12:00 +04:00
|
|
|
afterinstall: ${DATA} ${REDO}
|
2002-12-19 13:56:39 +03:00
|
|
|
mkdir -p ${TZBUILDDIR}
|
|
|
|
cd ${.CURDIR} && \
|
|
|
|
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR} -p ${POSIXRULES}
|
|
|
|
cd ${TZBUILDDIR} && \
|
|
|
|
( find . -type d | xargs -n 1 printf \
|
|
|
|
"%s type=dir mode=0755 uname=${BINOWN} gname=${BINGRP}\n" ; \
|
|
|
|
find . -type f | xargs -n 1 printf \
|
|
|
|
"%s type=file mode=0444 uname=${BINOWN} gname=${BINGRP}\n" ; \
|
|
|
|
) > ${TZBUILDSPEC}
|
|
|
|
cd ${TZBUILDDIR} && \
|
2002-12-23 09:52:48 +03:00
|
|
|
${PAX} -O -rw ${UNPRIVED:D:U-pe} -M -N ${NETBSDSRCDIR}/etc \
|
|
|
|
${DESTDIR}${TZDIR} < ${TZBUILDSPEC}
|
2002-12-19 13:56:39 +03:00
|
|
|
.if defined(UNPRIVED)
|
|
|
|
sed -e "s|^\.|./${TZDIR}|g" -e "s|//|/|g" < ${TZBUILDSPEC} | \
|
2002-12-23 09:52:48 +03:00
|
|
|
${METALOG.add}
|
1999-08-21 10:30:11 +04:00
|
|
|
.endif
|
2002-12-19 13:56:39 +03:00
|
|
|
|
|
|
|
.else # ${MKSHARE} == "no"
|
1998-09-27 21:22:03 +04:00
|
|
|
afterinstall:
|
2002-12-19 13:56:39 +03:00
|
|
|
.endif # ${MKSHARE} == "no"
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -rf ${TZBUILDDIR} ${TZBUILDSPEC}
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|