summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2013-01-10 19:46:08 +0000
committerbrooks <brooks@FreeBSD.org>2013-01-10 19:46:08 +0000
commit7aba5649405b3a4a015471e42981705bae090148 (patch)
tree5c8572fe5e361c169d90350f974e7e74e88e0734
parentf8200d9bc4de2e18914c36bbeb76cffced6288c5 (diff)
downloadFreeBSD-src-7aba5649405b3a4a015471e42981705bae090148.zip
FreeBSD-src-7aba5649405b3a4a015471e42981705bae090148.tar.gz
Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1). This was the one place in installworld where files (vs links) were installed by a tool other than install. Reviewed by: edwin, jilles
-rw-r--r--share/zoneinfo/Makefile35
1 files changed, 31 insertions, 4 deletions
diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile
index 6de8ef5..97181da 100644
--- a/share/zoneinfo/Makefile
+++ b/share/zoneinfo/Makefile
@@ -29,6 +29,7 @@
#
CLEANFILES+= yearistype
+CLEANDIRS+= builddir
CONTRIBDIR= ${.CURDIR}/../../contrib/tzdata/
.PATH: ${CONTRIBDIR}
@@ -48,13 +49,39 @@ TZFILES+= backward systemv
TZFILES:= ${TZFILES:S/^/${CONTRIBDIR}/}
-all: yearistype
+TZBUILDDIR= ${.OBJDIR}/builddir
+TZBUILDSUBDIRS= \
+ Africa \
+ America/Argentina \
+ America/Indiana \
+ America/Kentucky \
+ America/North_Dakota \
+ Antarctica \
+ Arctic \
+ Asia \
+ Atlantic \
+ Australia \
+ Etc \
+ Europe \
+ Indian \
+ Pacific \
+ SystemV
-beforeinstall:
+all: zoneinfo
+
+.PHONY: zoneinfo
+zoneinfo: yearistype ${TDATA}
+ mkdir -p ${TZBUILDDIR}
+ cd ${TZBUILDDIR}; mkdir -p ${TZBUILDSUBDIRS}
umask 022; cd ${.CURDIR}; \
- zic -D -d ${DESTDIR}/usr/share/zoneinfo -p ${POSIXRULES} \
- -u ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+ zic -D -d ${TZBUILDDIR} -p ${POSIXRULES} -m ${NOBINMODE} \
${LEAPFILE} -y ${.OBJDIR}/yearistype ${TZFILES}
+
+beforeinstall:
+ cd ${TZBUILDDIR} && \
+ find . -type f -print | xargs -I _FILE_ ${INSTALL} \
+ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+ _FILE_ ${DESTDIR}/usr/share/zoneinfo/_FILE_
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
OpenPOWER on IntegriCloud