summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2012-07-02 22:14:58 +0000
committerdougb <dougb@FreeBSD.org>2012-07-02 22:14:58 +0000
commit00074d9b0ff083aca70290ba56153b63b96b78a4 (patch)
treed283035b3f7a348c2afdb65aba42b480e3991a08
parent027ab2407dfe5b87fdda1863623f97303e4d236b (diff)
downloadFreeBSD-src-00074d9b0ff083aca70290ba56153b63b96b78a4.zip
FreeBSD-src-00074d9b0ff083aca70290ba56153b63b96b78a4.tar.gz
Unfortunately the change in r237958 resulted in s/install/instclean/ due to
the aggressive pattern matching of the :C modifier. I tested build and install in 2 phases, however with different solutions, resulting in the breakage. Mea culpa. The solution is to break out the all: target. This causes a few lines of code duplication, but now the all: target works as it should, and the other targets continue to work as they did before. While I'm here, add a ===> header line to the start of each port build to make it easier to find/more clear in the logs.
-rw-r--r--sys/conf/kern.post.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index 88679b9..1de2e1e 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -60,11 +60,21 @@ PORTSMODULESENV=\
SRC_BASE=${SRC_BASE} \
OSVERSION=${OSRELDATE} \
WRKDIRPREFIX=${WRKDIRPREFIX}
-.for __target in all install reinstall clean
+
+# The WRKDIR needs to be cleaned before building, and trying to change the target
+# with a :C pattern below results in install -> instclean
+all:
+.for __i in ${PORTS_MODULES}
+ @${ECHO} "===> Ports module ${__i} (all)"
+ cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean all
+.endfor
+
+.for __target in install reinstall clean
${__target}: ports-${__target}
ports-${__target}:
.for __i in ${PORTS_MODULES}
- cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/all/clean all/:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
+ @${ECHO} "===> Ports module ${__i} (${__target})"
+ cd $${PORTSDIR:-/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/install/deinstall reinstall/:C/reinstall/deinstall reinstall/}
.endfor
.endfor
.endif
OpenPOWER on IntegriCloud