[ELDK] [PATCH 2/3] Add some environment variables to allow restart of ELDK_BUILD when it fails.

Phil Terry pterry at vmetro.com
Tue Apr 22 00:57:07 CEST 2008


From: Phil Terry <pterry at micromemory.com>

Trying to get ELDK_BUILD from scratch to work is incredibly time consuming when
trying to fix trg build steps as you have to wait for crosstools builds each
time. This patch adds a DEV_BUILD and DEV_BUILD_STEP environment variable to
allow restarting the build process at the failed step after trying some fix.

Once you've made progress in this way you can go back to a normal full build
to verify everything.
---
 ELDK_BUILD |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ELDK_BUILD b/ELDK_BUILD
index fb943f5..797a481 100755
--- a/ELDK_BUILD
+++ b/ELDK_BUILD
@@ -233,7 +233,7 @@ esac
 : ${BUILD_PREFIX:=`pwd`}
 BUILD_WORK=${BUILD_PREFIX}/${CROSS_ARCH}-${BUILD_NAME}
 
-if [ -d ${BUILD_WORK} ]
+if [ -d ${BUILD_WORK} -a x"$DEV_BUILD" = "x" ]
 then
 	echo -e "Directory ${BUILD_WORK} exists - erase all data? [N/y] \c"
 	read tmp
@@ -254,7 +254,7 @@ linux)	CPIO_OPTS="--quiet"	;;	# Linux uses GNU cpio
 *)	CPIO_OPTS=""		;;
 esac
 
-find	cross_rpms	\
+[ x"$DEV_BUILD" != "x" ] || find	cross_rpms	\
 	target_rpms	\
 	install		\
 	misc		\
@@ -289,7 +289,7 @@ esac
 trap "rm -fr ${TMP_DIR}" 0 1 2 3 15
 mkdir -p $RPM_DIR/SOURCES $RPM_DIR/SPECS
 
-for dir in cross_rpms target_rpms
+[ x"$DEV_BUILD" != "x" ] || for dir in cross_rpms target_rpms
 do
 	cd ${BUILD_WORK}/${dir} || exit 1
 	ls | \
@@ -306,7 +306,7 @@ done
 # Install source files provided as tarballs
 #
 echo "## tarballs:"
-while read dir file url
+[ x"$DEV_BUILD" != "x" ] || while read dir file url
 do
 	# Skip comments
 	expr "$dir" : '#*' >/dev/null && continue
@@ -321,8 +321,12 @@ if [ -f ${FAILED} ]; then
 fi
 
 cd ${BUILD_WORK} || exit 1
-
-for BUILD_STEP in rpm eldt seldt trg diso biso siso
+if [ x"$DEV_BUILD" = "x" ] ; then
+    BUILD_STEPS="rpm eldt seldt trg diso biso siso"
+else
+    BUILD_STEPS=$DEV_BUILD
+fi
+for BUILD_STEP in $BUILD_STEPS
 do
 	cat <<+++
 #
@@ -338,7 +342,7 @@ set -x
 		-p ${BUILD_WORK} \
 		-r ${BUILD_WORK}/results \
 		-w ${BUILD_WORK}/work \
-		${BUILD_STEP}	|| exit 1
+		${BUILD_STEP} $DEV_BUILD_STEP	|| exit 1
 done
 
 # Create ISO images
-- 
1.5.4




More information about the eldk mailing list