Patchwork abuild: Don't skip rebuilds

login
register
about
Submitter Stefan Reinauer
Date 2010-12-11 21:31:01
Message ID <4D03ED95.80904@coresystems.de>
Download mbox | patch
Permalink /patch/2417/
State Accepted
Commit r6162
Headers show

Comments

Stefan Reinauer - 2010-12-11 21:31:01
See patch.
abuild and machines are reasonably fast.

Don't skip already built targets anymore, because a recent change could have
broken them again. Instead rely on coreboot's dependencies to figure out what
to rebuild.

Signed-off-by: Stefan Reinauer <stepan@coreboot.org>
Peter Stuge - 2010-12-11 21:34:41
Stefan Reinauer wrote:
> abuild and machines are reasonably fast.
> 
> Don't skip already built targets anymore, because a recent change could have
> broken them again. Instead rely on coreboot's dependencies to figure out what
> to rebuild.
> 
> Signed-off-by: Stefan Reinauer <stepan@coreboot.org>

Acked-by: Peter Stuge <peter@stuge.se>

This may show interesting breakage if our dependencies are not
perfect! :) (This is good!)


//Peter

Patch

Index: util/abuild/abuild
===================================================================
--- util/abuild/abuild	(revision 6161)
+++ util/abuild/abuild	(working copy)
@@ -14,8 +14,8 @@ 
 
 #set -x # Turn echo on....
 
-ABUILD_DATE="January 29th, 2010"
-ABUILD_VERSION="0.9"
+ABUILD_DATE="December 10th, 2010"
+ABUILD_VERSION="0.9.1"
 
 # Where shall we place all the build trees?
 TARGET=coreboot-builds
@@ -154,7 +154,6 @@ 
 	fi
 
 	[ "$update" = "true" ] && mv ${build_dir}/coreboot.rom coreboot.rom.tmp
-	$MAKE distclean obj=${build_dir}
 	mkdir -p ${build_dir}
 	mkdir -p $TARGET/sharedutils
 	[ "$update" = "true" ] && mv coreboot.rom.tmp ${build_dir}/coreboot.rom
@@ -240,12 +239,18 @@ 
 
 	# Allow simple "make" in the target directory
 	MAKEFILE=$TARGET/${VENDOR}_${MAINBOARD}/Makefile
-	echo "# autogenerated makefile" > $MAKEFILE
+	echo "# autogenerated" > $MAKEFILE
 	echo "TOP=$ROOT" >> $MAKEFILE
-	echo "OUT=$TARGET/${VENDOR}_${MAINBOARD}" >> $MAKEFILE
+	echo "BUILD=$TARGET" >> $MAKEFILE
+	echo "OBJ=\$(BUILD)/${VENDOR}_${MAINBOARD}" >> $MAKEFILE
+	echo "OBJUTIL=\$(BUILD)/sharedutils" >> $MAKEFILE
 	echo "all:" >> $MAKEFILE
-	echo "	cd \$(TOP); \$(MAKE) oldconfig DOTCONFIG=\$(OUT)/config.build obj=\$(OUT)" >> $MAKEFILE
-	echo "	cd \$(TOP); \$(MAKE) DOTCONFIG=\$(OUT)/config.build obj=\$(OUT)" >> $MAKEFILE
+	echo "	@cp -a config.h config.h.bak" >> $MAKEFILE
+	echo "	@cd \$(TOP); \$(MAKE) oldconfig DOTCONFIG=\$(OBJ)/config.build objutil=\$(OBJUTIL) obj=\$(OBJ)" >> $MAKEFILE
+	echo "	@tail -n+6 config.h > config.new; tail -n+6 config.h.bak > config.old" >> $MAKEFILE
+	echo "	@cmp -s config.new config.old && cp -a config.h.bak config.h || echo \"Config file changed\"" >> $MAKEFILE
+	echo "	@rm config.h.bak config.new config.old" >> $MAKEFILE
+	echo "	@cd \$(TOP); \$(MAKE) DOTCONFIG=\$(OBJ)/config.build objutil=\$(OBJUTIL) obj=\$(OBJ)" >> $MAKEFILE
 
 	return $ret
 }
@@ -292,20 +297,6 @@ 
 	fi
 }
 
-function built_successfully
-{
-	CURR=`pwd`
-	status="fail"
-	if [ -d "$TARGET/${VENDOR}_${MAINBOARD}" ]; then
-		cd $TARGET/${VENDOR}_${MAINBOARD}
-		if [ -r compile.status ] ; then
-			status=`cat compile.status`
-		fi
-		cd $CURR
-	fi
-	[ "$buildall" != "true" -a "$status" == "ok" ]
-}
-
 function build_broken
 {
 	CURR=`pwd`
@@ -406,15 +397,6 @@ 
 		CC="$CC -fno-stack-protector"
 	fi
 
-	built_successfully $VENDOR $MAINBOARD && test $update = "false" && \
-	{
-		printf " ( mainboard/$VENDOR/$MAINBOARD previously ok )\n\n"
-		xml "  <status>previouslyok</status>"
-		xml ""
-		xml "</mainboard>"
-		return 0
-	}
-
 	build_broken $VENDOR $MAINBOARD || \
 	{
 		printf " ( broken mainboard/$VENDOR/$MAINBOARD skipped )\n\n"