diff buildall.sh @ 744:759adf5a0fe9

Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
author Rob Landley <rob@landley.net>
date Thu, 11 Jun 2009 05:42:51 -0500
parents 88c2f1225e35
children 38534e7a4844
line wrap: on
line diff
--- a/buildall.sh	Thu Jun 11 00:26:15 2009 -0500
+++ b/buildall.sh	Thu Jun 11 05:42:51 2009 -0500
@@ -11,6 +11,7 @@
   ARCHES="$(cd sources/targets/; ls | grep -v '^hw-')"
 [ -z "$ALLARCHES" ] &&
   ALLARCHES="${ARCHES} $(cd sources/targets; ls | grep '^hw-')"
+export FAIL_QUIET=1
 
 DO_SKIP_STAGE_TARBALLS="$SKIP_STAGE_TARBALLS"
 [ ! -z "$CROSS_COMPILERS_EH" ] && DO_SKIP_STAGE_TARBALLS=1
@@ -83,7 +84,7 @@
 
   for i in ${ARCHES}
   do
-    mv build/{root-filesystem-$i,cross-compiler-$i} &&
+    mv build/{root-filesystem-$i,cross-compiler-$i} 2>/dev/null &&
     doforklog tar cjfC build/cross-compiler-$i.tar.bz2 build cross-compiler-$i
   done
 
@@ -107,7 +108,7 @@
 
   for i in ${ARCHES}
   do
-    mv build/{root-filesystem-$i,natemp-$i} &&
+    mv build/{root-filesystem-$i,natemp-$i} 2>/dev/null &&
     doforklog tar cjfC build/native-compiler-$i.tar.bz2 build/natemp-"$i" .
   done
 
@@ -120,8 +121,7 @@
 
 for i in ${ARCHES}
 do
-  [ -f "build/cross-compiler-$i.tar.bz2" ] &&
-    LOG=build/root-filesystem-$i.txt doforklog ./root-filesystem.sh $i
+  LOG=build/root-filesystem-$i.txt doforklog ./root-filesystem.sh $i
 done
 
 wait4background
@@ -133,4 +133,11 @@
   LOG=build/system-image-$i.txt doforklog ./system-image.sh $i
 done
 
+# Run smoketest.sh for each non-hw target.
+
+for i in ${ARCHES}
+do
+  LOG=build/smoketest-$i.txt doforklog ./smoketest.sh $i
+done
+
 wait4background 0