Get SYSDIR set correctly for building ports.

On install, do deinstall reinstall
This commit is contained in:
Warner Losh 2005-02-25 05:34:45 +00:00
parent 3e9d9cface
commit f747977691

View File

@ -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