1 # $NetBSD: Makefile,v 1.43 2009/04/10 16:16:12 apb Exp $
5 # Change the line below for your time zone (after finding the zone you want in
6 # the time zone files, or adding it to a time zone file).
7 # Alternately, if you discover you've got the wrong time zone, you can just
10 # If you want something other than Eastern United States time as a template
11 # for handling POSIX-style time zone environment variables,
12 # change the line below (after finding the zone you want in the
13 # time zone files, or adding it to a time zone file).
14 # Alternately, if you discover you've got the wrong time zone, you can just
17 POSIXRULES
= US
/Pacific
19 # Use an absolute path name for TZDIR unless you're just testing the software.
20 # Note: ${DESTDIR} is prepended to this for the actual copy.
22 TZDIR
= /usr
/share
/zoneinfo
24 # If you always want time values interpreted as "seconds since the epoch
25 # (not counting leap seconds)", use
27 # below. If you always want right time values interpreted as "seconds since
28 # the epoch" (counting leap seconds)", use
30 # below. If you want both sets of data available, with leap seconds not
31 # counted normally, use
33 # below. If you want both sets of data available, with leap seconds counted
40 # Since "." may not be in PATH...
41 YEARISTYPE
= "${HOST_SH} ${.CURDIR}/yearistype.sh"
43 YDATA
= africa antarctica asia australasia \
44 europe northamerica southamerica pacificnew etcetera factory \
47 SDATA
= solar87 solar88 solar89
48 TDATA
= $(YDATA
) $(NDATA
) $(SDATA
)
49 TABDATA
= iso3166.tab zone.tab
50 DATA
= $(YDATA
) $(NDATA
) $(SDATA
) leapseconds
# yearistype.sh
51 USNO
= usno1988 usno1989
53 TZBUILDDIR
= ${.OBJDIR
}/builddir
58 mkdir
-p
${TZBUILDDIR}
60 ${TOOL_ZIC} -y
${YEARISTYPE} -d
${TZBUILDDIR} -L
/dev
/null
${TDATA}
63 right_only
: leapseconds
${TDATA}
65 mkdir
-p
${TZBUILDDIR}
67 ${TOOL_ZIC} -y
${YEARISTYPE} -d
${TZBUILDDIR} -L leapseconds
${TDATA}
70 other_two
: leapseconds
${TDATA}
72 mkdir
-p
${TZBUILDDIR}
74 ${TOOL_ZIC} -y
${YEARISTYPE} -d
${TZBUILDDIR}/posix
-L
/dev
/null
${TDATA}
76 ${TOOL_ZIC} -y
${YEARISTYPE} -d
${TZBUILDDIR}/right
-L leapseconds
${TDATA}
79 posix_right
: posix_only other_two
82 right_posix
: right_only other_two
84 .if
${MKUNPRIVED} == "no"
90 .if
${MKSHARE} != "no"
91 afterinstall
: ${DATA} ${REDO} ${TABDATA}
92 ${_MKMSG_CREATE} ${POSIXRULES}
93 mkdir
-p
${TZBUILDDIR}
95 ${TOOL_ZIC} -y
${YEARISTYPE} -d
${TZBUILDDIR} -p
${POSIXRULES}
97 find .
-type f
-print | xargs
${TOOL_STAT} -qf
'%d,%i %N' |
sort \
98 | while read devino tzfile
; do \
99 destfile
=${DESTDIR}${TZDIR}/$${tzfile
#./}; \
100 if
[ "$$devino" = "$$lastdevino" ]; then \
101 if ldevino
=`${TOOL_STAT} -qf '%d %i' $$lastfile` && \
102 tdevino
=`${TOOL_STAT} -qf '%d %i' $$destfile` && \
103 [ "$$ldevino" = "$$tdevino" ]; then \
106 ${_MKSHMSG_INSTALL} $$destfile; \
107 ${_MKSHECHO} ${INSTALL_LINK} -o
${BINOWN} -g
${BINGRP} \
108 -m
${NONBINMODE} $$lastfile $$destfile; \
109 ${INSTALL_LINK} -o
${BINOWN} -g
${BINGRP} \
110 -m
${NONBINMODE} $$lastfile $$destfile; \
112 lastdevino
=$$devino; \
113 lastfile
=$$destfile; \
114 cmp
-s
$$tzfile $$destfile >/dev
/null
2>&1 && continue
;\
115 ${_MKSHMSG_INSTALL} $$destfile; \
116 ${_MKSHECHO} ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} \
117 -m
${NONBINMODE} $$tzfile $$destfile; \
118 ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} \
119 -m
${NONBINMODE} $$tzfile $$destfile; \
122 for f in
${TABDATA}; do \
123 ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} -m
${NONBINMODE} \
124 ${.CURDIR
}/$$f ${DESTDIR}${TZDIR}; \
126 .
else # ${MKSHARE} == "no"
128 .
endif # ${MKSHARE} == "no"
131 -rm -rf
${TZBUILDDIR}
133 .
include <bsd.prog.mk
>