summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-02-25 05:34:45 +0000
committerimp <imp@FreeBSD.org>2005-02-25 05:34:45 +0000
commit0fa967aace2c1f9b866dcadb51a70a84b06e8cd6 (patch)
treeb228de7bc56c64823c2a370a46c244c3f7bb5fa4
parenta876e908eac817e1c2679fd5d50723363720f4b8 (diff)
downloadFreeBSD-src-0fa967aace2c1f9b866dcadb51a70a84b06e8cd6.zip
FreeBSD-src-0fa967aace2c1f9b866dcadb51a70a84b06e8cd6.tar.gz
Get SYSDIR set correctly for building ports.
On install, do deinstall reinstall
-rw-r--r--sys/conf/kern.post.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 3464574..860c78e 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -29,14 +29,17 @@ modules-${target}:
# Handle out of tree ports
.if defined(PORTS_MODULES)
-.if defined(SYSDIR)
-PORTSMODULESENV=SYSDIR=${SYSDIR}
+.for _dir in ${.CURDIR}/../../..
+.if !defined(SYSDIR) && exists(${_dir}/kern/)
+SYSDIR= ${_dir}
.endif
+.endfor
+PORTSMODULESENV=SYSDIR=${SYSDIR}
.for __target in all install clean
-${__target}: ports-${target}
+${__target}: ports-${__target}
ports-${__target}:
.for __i in ${PORTS_MODULES}
- cd $${PORTSDIR:-/usr/ports/}${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target}
+ cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/}
.endfor
.endfor
.endif
OpenPOWER on IntegriCloud