NetBSD/share/zoneinfo/Makefile

110 lines
3.3 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.32 2002/12/23 06:52:51 lukem Exp $
.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.
# Note: ${DESTDIR} is prepended to this for the actual copy.
1993-03-21 12:45:37 +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.
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...
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
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}
mkdir -p ${TZBUILDDIR}
cd ${.CURDIR} && \
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR} -L /dev/null ${TDATA}
1993-03-21 12:45:37 +03:00
.PHONY: right_only
right_only: leapseconds ${TDATA}
mkdir -p ${TZBUILDDIR}
cd ${.CURDIR} && \
${ZIC} -y ${YEARISTYPE} -d ${TZBUILDDIR} -L leapseconds ${TDATA}
.PHONY: other_two
other_two: leapseconds ${TDATA}
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}
.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
.if ${MKSHARE} != "no"
afterinstall: ${DATA} ${REDO}
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} && \
${PAX} -O -rw ${UNPRIVED:D:U-pe} -M -N ${NETBSDSRCDIR}/etc \
${DESTDIR}${TZDIR} < ${TZBUILDSPEC}
.if defined(UNPRIVED)
sed -e "s|^\.|./${TZDIR}|g" -e "s|//|/|g" < ${TZBUILDSPEC} | \
${METALOG.add}
.endif
.else # ${MKSHARE} == "no"
afterinstall:
.endif # ${MKSHARE} == "no"
clean:
-rm -rf ${TZBUILDDIR} ${TZBUILDSPEC}
1993-03-21 12:45:37 +03:00
.include <bsd.prog.mk>