1 # $NetBSD: Makefile,v 1.44 2013/03/06 17:32:51 christos 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 destdir
=$$(dirname
$${destfile}); \
101 if
[ ! -d
"$$destdir" ]; then \
102 ${_MKSHMSG_INSTALL} $$destdir; \
103 ${_MKSHECHO} ${INSTALL_DIR} -o
${BINOWN} -g
${BINGRP} \
105 ${INSTALL_DIR} -o
${BINOWN} -g
${BINGRP} $$destdir; \
107 if
[ "$$devino" = "$$lastdevino" ]; then \
108 if ldevino
=$$(${TOOL_STAT} -qf
'%d %i' $$lastfile) && \
109 tdevino
=$$(${TOOL_STAT} -qf
'%d %i' $$destfile) && \
110 [ "$$ldevino" = "$$tdevino" ]; then \
113 ${_MKSHMSG_INSTALL} $$destfile; \
114 ${_MKSHECHO} ${INSTALL_LINK} -o
${BINOWN} -g
${BINGRP} \
115 -m
${NONBINMODE} $$lastfile $$destfile; \
116 ${INSTALL_LINK} -o
${BINOWN} -g
${BINGRP} \
117 -m
${NONBINMODE} $$lastfile $$destfile; \
119 lastdevino
=$$devino; \
120 lastfile
=$$destfile; \
121 cmp
-s
$$tzfile $$destfile >/dev
/null
2>&1 && continue
;\
122 ${_MKSHMSG_INSTALL} $$destfile; \
123 ${_MKSHECHO} ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} \
124 -m
${NONBINMODE} $$tzfile $$destfile; \
125 ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} \
126 -m
${NONBINMODE} $$tzfile $$destfile; \
129 for f in
${TABDATA}; do \
130 ${INSTALL_FILE} -o
${BINOWN} -g
${BINGRP} -m
${NONBINMODE} \
131 ${.CURDIR
}/$$f ${DESTDIR}${TZDIR}; \
133 .
else # ${MKSHARE} == "no"
135 .
endif # ${MKSHARE} == "no"
138 -rm -rf
${TZBUILDDIR}
140 .
include <bsd.prog.mk
>