Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2013 19:16:35 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r248336 - in stable/9: . share/zoneinfo
Message-ID:  <201303151916.r2FJGZ9C034063@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Mar 15 19:16:35 2013
New Revision: 248336
URL: http://svnweb.freebsd.org/changeset/base/248336

Log:
  MFC r245265,245271,245309:
  
  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

Modified:
  stable/9/share/zoneinfo/Makefile
Directory Properties:
  stable/9/Makefile.inc1   (props changed)
  stable/9/share/zoneinfo/   (props changed)

Modified: stable/9/share/zoneinfo/Makefile
==============================================================================
--- stable/9/share/zoneinfo/Makefile	Fri Mar 15 18:49:39 2013	(r248335)
+++ stable/9/share/zoneinfo/Makefile	Fri Mar 15 19:16:35 2013	(r248336)
@@ -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
-
-beforeinstall:
+TZBUILDDIR=	${.OBJDIR}/builddir
+TZBUILDSUBDIRS=	\
+		Africa \
+		America/Argentina \
+		America/Indiana \
+		America/Kentucky \
+		America/North_Dakota \
+		Antarctica \
+		Arctic \
+		Asia \
+		Atlantic \
+		Australia \
+		Etc \
+		Europe \
+		Indian \
+		Pacific \
+		SystemV
+
+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 -exec ${INSTALL} \
+	    -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
+	    \{} ${DESTDIR}/usr/share/zoneinfo/\{} \;
 	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
 	    ${CONTRIBDIR}/zone.tab ${DESTDIR}/usr/share/zoneinfo/
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303151916.r2FJGZ9C034063>