From 0fa967aace2c1f9b866dcadb51a70a84b06e8cd6 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 25 Feb 2005 05:34:45 +0000 Subject: Get SYSDIR set correctly for building ports. On install, do deinstall reinstall --- sys/conf/kern.post.mk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sys/conf') 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 -- cgit v1.1