summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2014-12-18 18:16:00 +0000
committerEnji Cooper <ngie@FreeBSD.org>2014-12-18 18:16:00 +0000
commitf703589ef4b4d0afd59b54c0482aaa1445a8e06e (patch)
tree0d9fb02f5bc125bd07f95927553f82cebae21a89 /Makefile.inc1
parenteb28afe4221409a70cd8a064f77fe88af86da2e2 (diff)
downloadsrc-test2-f703589ef4b4d0afd59b54c0482aaa1445a8e06e.tar.gz
src-test2-f703589ef4b4d0afd59b54c0482aaa1445a8e06e.zip
Fix building/installing tests when TESTSBASE != /usr/tests
The work in r258233 hardcoded the assumption that tests was the last component of the tests tree by pushing tests as an explicit prefix for the paths in BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all of the mtree calls used in Makefile.inc1. This assumption breaks if/when one provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests . One thing that r258233 did properly though was remove "/usr/tests" creation from BSD.usr.dist -- that should have not been there in the first place. That was an "oops" on my part for the work that was originally committed in r241823 MFC after: 2 weeks Phabric: D1301 Reviewed by: imp Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=275907
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc19
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 86294fef1b82..2bcb45e54f2b 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -526,8 +526,9 @@ _worldtmp:
-p ${WORLDTMP}/usr/lib >/dev/null
.endif
.if ${MK_TESTS} != "no"
+ mkdir -p ${WORLDTMP}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
- -p ${WORLDTMP}/usr >/dev/null
+ -p ${WORLDTMP}${TESTSBASE} >/dev/null
.endif
.for _mtree in ${LOCAL_MTREE}
mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
@@ -866,8 +867,9 @@ distributeworld installworld: _installcheck_world
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
.endif
.if ${MK_TESTS} != "no" && ${dist} == "tests"
+ -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
- -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
+ -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null
.endif
.if defined(NO_ROOT)
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \
@@ -2085,8 +2087,9 @@ _xi-mtree:
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
.if ${MK_TESTS} != "no"
+ mkdir -p ${XDDESTDIR}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
- -p ${XDDESTDIR}/usr >/dev/null
+ -p ${XDDESTDIR}${TESTSBASE} >/dev/null
.endif
.ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries