summaryrefslogtreecommitdiffstats
path: root/sys/conf/kern.post.mk
diff options
context:
space:
mode:
Diffstat (limited to 'sys/conf/kern.post.mk')
-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