All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Improve MAKEALL parallel builds
@ 2012-05-10  6:36 Andy Fleming
  2012-05-18 11:49 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Fleming @ 2012-05-10  6:36 UTC (permalink / raw)
  To: u-boot

The patch that added parallel builds broke MAKEALL -l, so this
fixes that. At the same time, it improves the termination so
that it shuts down the build threads if you cancel the build.
Lastly, it removes a bunch of debug code.

Signed-off-by: Andy Fleming <afleming@freescale.com>
---
 MAKEALL |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 5b610bf..05e2d90 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -340,12 +340,7 @@ LIST_ARM9="$(boards_by_cpu arm920t)	\
 #########################################################################
 ## ARM11 Systems
 #########################################################################
-LIST_ARM11="$(boards_by_cpu arm1136)	\
-	imx31_phycore		\
-	imx31_phycore_eet	\
-	mx31pdk			\
-	smdk6400		\
-"
+LIST_ARM11="$(boards_by_cpu arm1136)"
 
 #########################################################################
 ## ARMV7 Systems
@@ -615,6 +610,11 @@ build_target() {
 	target=$1
 	build_idx=$2
 
+	if [ "$ONLY_LIST" == 'y' ] ; then
+		list_target ${target}
+		return
+	fi
+
 	if [ $BUILD_MANY == 1 ] ; then
 		output_dir="${OUTPUT_PREFIX}/${target}"
 		mkdir -p "${output_dir}"
@@ -624,11 +624,6 @@ build_target() {
 
 	export BUILD_DIR="${output_dir}"
 
-	if [ "$ONLY_LIST" == 'y' ] ; then
-		list_target ${target}
-		return
-	fi
-
 	${MAKE} distclean >/dev/null
 	${MAKE} -s ${target}_config
 
@@ -666,16 +661,15 @@ build_target() {
 
 	[ -e "${LOG_DIR}/${target}.ERR" ] && cat "${LOG_DIR}/${target}.ERR"
 
-	#echo "Writing ${donep}${build_idx}"
 	touch "${donep}${build_idx}"
 }
 
 manage_builds() {
 	search_idx=${OLDEST_IDX}
-	#echo "Searching ${OLDEST_IDX} to ${TOTAL_CNT}"
+	if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
+
 	while true; do
 		if [ -e "${donep}${search_idx}" ] ; then
-	#		echo "Found ${donep}${search_idx}"
 			: $(( CURRENT_CNT-- ))
 			[ ${OLDEST_IDX} -eq ${search_idx} ] &&
 				: $(( OLDEST_IDX++ ))
@@ -687,10 +681,8 @@ manage_builds() {
 			[ ${OLDEST_IDX} -eq ${search_idx} ] &&
 				: $(( OLDEST_IDX++ ))
 		fi
-		#echo "Checking search ${search_idx} vs ${TOTAL_CNT}"
 		: $(( search_idx++ ))
 		if [ ${search_idx} -gt ${TOTAL_CNT} ] ; then
-			#echo "Checking current ${CURRENT_CNT} vs ${BUILD_NBUILDS}"
 			if [ ${CURRENT_CNT} -ge ${BUILD_NBUILDS} ] ; then
 				search_idx=${OLDEST_IDX}
 				sleep 1
@@ -739,6 +731,12 @@ build_targets() {
 
 #-----------------------------------------------------------------------
 
+kill_children() {
+	kill -- "-$1"
+
+	exit
+}
+
 print_stats() {
 	if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
 
@@ -759,6 +757,10 @@ print_stats() {
 	fi
 	echo "----------------------------------------------------------"
 
+	if [ $BUILD_MANY == 1 ] ; then
+		kill_children $$ &
+	fi
+
 	exit $RC
 }
 
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] Improve MAKEALL parallel builds
  2012-05-10  6:36 [U-Boot] [PATCH] Improve MAKEALL parallel builds Andy Fleming
@ 2012-05-18 11:49 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2012-05-18 11:49 UTC (permalink / raw)
  To: u-boot

Dear Andy Fleming,

In message <1336631788-28127-1-git-send-email-afleming@freescale.com> you wrote:
> The patch that added parallel builds broke MAKEALL -l, so this
> fixes that. At the same time, it improves the termination so
> that it shuts down the build threads if you cancel the build.
> Lastly, it removes a bunch of debug code.
> 
> Signed-off-by: Andy Fleming <afleming@freescale.com>
> ---
>  MAKEALL |   34 ++++++++++++++++++----------------
>  1 files changed, 18 insertions(+), 16 deletions(-)

I confirm this fixes the -l issue, so:

Tested-by: Wolfgang Denk <wd@denx.de>

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lady Nancy Astor:
    "Winston, if you were my husband, I'd put poison in your coffee."
Winston Churchill:
    "Nancy, if you were my wife, I'd drink it."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-18 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-10  6:36 [U-Boot] [PATCH] Improve MAKEALL parallel builds Andy Fleming
2012-05-18 11:49 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.