summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2013-06-14 22:32:47 +0000
committerbrooks <brooks@FreeBSD.org>2013-06-14 22:32:47 +0000
commitb69b3510d9b13ea21c4569b382b7b998a6c57ca3 (patch)
treee192b86b5f2394caa2cd3a15a32303f83c868226 /Makefile.inc1
parentceb4b0c61b84d784d1b9c597af9c6555e9c00186 (diff)
downloadFreeBSD-src-b69b3510d9b13ea21c4569b382b7b998a6c57ca3.zip
FreeBSD-src-b69b3510d9b13ea21c4569b382b7b998a6c57ca3.tar.gz
Simplify the hierarchy target's logic. [0]
Run hierarchy with WORLDTMP in the path so it works when it is invoked directly. Such use is nearly alwasy wrong but appears to be common.[1] PR: conf/178209 [0], conf/178547 [1] Submitted by: Garrett Cooper <yaneurabeya@gmail.com> [0] MFC after: 5 days
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc114
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 2b49ab8..2aca77f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -263,6 +263,13 @@ WMAKEENV= ${CROSSENV} \
VERSION="${VERSION}" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH}
+
+# make hierarchy
+HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE}
+.if defined(NO_ROOT)
+HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT
+.endif
+
.if ${MK_CDDL} == "no"
WMAKEENV+= NO_CTF=1
.endif
@@ -1367,12 +1374,7 @@ cross-tools:
# hierarchy - ensure that all the needed directories are present
#
hierarchy hier:
-.if defined(NO_ROOT)
- cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \
- -DNO_ROOT METALOG=${METALOG} distrib-dirs
-.else
- cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
-.endif
+ cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs
#
# libraries - build all libraries, and install them under ${DESTDIR}.
OpenPOWER on IntegriCloud