Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 22:19:03 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r238041 - stable/7/sys/conf
Message-ID:  <201207022219.q62MJ3El003393@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Mon Jul  2 22:19:02 2012
New Revision: 238041
URL: http://svn.freebsd.org/changeset/base/238041

Log:
  MFC r238038:
  
  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.

Modified:
  stable/7/sys/conf/kern.post.mk
Directory Properties:
  stable/7/sys/   (props changed)

Modified: stable/7/sys/conf/kern.post.mk
==============================================================================
--- stable/7/sys/conf/kern.post.mk	Mon Jul  2 22:18:49 2012	(r238040)
+++ stable/7/sys/conf/kern.post.mk	Mon Jul  2 22:19:02 2012	(r238041)
@@ -52,11 +52,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207022219.q62MJ3El003393>