changeset 675:4571f63c2298

Add SKIP_STAGE_TARBALLS config option to skip creating tarballs after each stage.
author Rob Landley <rob@landley.net>
date Mon, 30 Mar 2009 01:11:34 -0500
parents 133eca1561b9
children 112dc7b787d3
files config cross-compiler.sh mini-native.sh system-image.sh
diffstat 4 files changed, 38 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/config	Sun Mar 29 23:30:29 2009 -0500
+++ b/config	Mon Mar 30 01:11:34 2009 -0500
@@ -78,6 +78,9 @@
 # Debugging option to leave source in build/temp-$ARCH after build.
 # export NO_CLEANUP=1
 
+# Don't create tarballs at the end of each stage.
+# export SKIP_STAGE_TARBALLS=1
+
 # If this is set, the output of the various stages will be color coded.
 # export USE_COLOR=1
 
--- a/cross-compiler.sh	Sun Mar 29 23:30:29 2009 -0500
+++ b/cross-compiler.sh	Mon Mar 30 01:11:34 2009 -0500
@@ -128,19 +128,22 @@
 
 # Tar it up
 
-echo -n creating "build/cross-compiler-${ARCH}".tar.bz2 &&
-cd "${BUILD}" || dienow
-{ tar cjvf "cross-compiler-${ARCH}".tar.bz2 cross-compiler-"${ARCH}" || dienow
-} | dotprogress
-
-# If we're building something with a $BASE_ARCH, symlink to actual target name.
+if [ -z "$SKIP_STAGE_TARBALLS" ]
+then
+  echo -n creating "build/cross-compiler-${ARCH}".tar.bz2 &&
+  cd "${BUILD}" || dienow
+  { tar cjvf "cross-compiler-${ARCH}".tar.bz2 cross-compiler-"${ARCH}" || dienow
+  } | dotprogress
 
-if [ "$ARCH" != "$ARCH_NAME" ]
-then
-  rm -rf "cross-compiler-$ARCH_NAME"{,.tar.bz2} &&
-  ln -s cross-compiler-"$ARCH" cross-compiler-"$ARCH_NAME" &&
-  ln -s cross-compiler-"$ARCH".tar.bz2 cross-compiler-"$ARCH_NAME".tar.bz2 ||
-    dienow
+  # If we're building something with a $BASE_ARCH, symlink to actual target.
+
+  if [ "$ARCH" != "$ARCH_NAME" ]
+  then
+    rm -rf "cross-compiler-$ARCH_NAME"{,.tar.bz2} &&
+    ln -s cross-compiler-"$ARCH" cross-compiler-"$ARCH_NAME" &&
+    ln -s cross-compiler-"$ARCH".tar.bz2 cross-compiler-"$ARCH_NAME".tar.bz2 ||
+      dienow
+  fi
 fi
 
 # A quick hello world program to test the cross-compiler out.
--- a/mini-native.sh	Sun Mar 29 23:30:29 2009 -0500
+++ b/mini-native.sh	Mon Mar 30 01:11:34 2009 -0500
@@ -302,19 +302,22 @@
 "${ARCH}-strip" "${TOOLS}"/{bin/*,sbin/*,libexec/gcc/*/*/*}
 "${ARCH}-strip" --strip-unneeded "${TOOLS}"/lib/*.so
 
-echo -n creating mini-native-"${ARCH}".tar.bz2 &&
-cd "${BUILD}" &&
-{ tar cjvf "mini-native-${ARCH}.tar.bz2" "mini-native-${ARCH}" || dienow
-} | dotprogress
-
-# If we're building something with a $BASE_ARCH, symlink to actual target name.
+if [ -z "$SKIP_STAGE_TARBALLS" ]
+then
+  echo -n creating mini-native-"${ARCH}".tar.bz2 &&
+  cd "${BUILD}" &&
+  { tar cjvf "mini-native-${ARCH}.tar.bz2" "mini-native-${ARCH}" || dienow
+  } | dotprogress
 
-if [ "$ARCH" != "$ARCH_NAME" ]
-then
-  rm -rf "mini-native-$ARCH_NAME"{,.tar.bz2} &&
-  ln -s mini-native-"$ARCH" mini-native-"$ARCH_NAME" &&
-  ln -s mini-native-"$ARCH".tar.bz2 mini-native-"$ARCH_NAME".tar.bz2 ||
-    dienow
+  # If we're building something with a $BASE_ARCH, symlink to target name.
+
+  if [ "$ARCH" != "$ARCH_NAME" ]
+  then
+    rm -rf "mini-native-$ARCH_NAME"{,.tar.bz2} &&
+    ln -s mini-native-"$ARCH" mini-native-"$ARCH_NAME" &&
+    ln -s mini-native-"$ARCH".tar.bz2 mini-native-"$ARCH_NAME".tar.bz2 ||
+      dienow
+  fi
 fi
 
 
--- a/system-image.sh	Sun Mar 29 23:30:29 2009 -0500
+++ b/system-image.sh	Mon Mar 30 01:11:34 2009 -0500
@@ -173,7 +173,10 @@
 
 # Tar it up.
 
-tar -cvj -f "$BUILD"/system-image-$ARCH_NAME.tar.bz2 \
-  -C "$BUILD" system-image-$ARCH_NAME || dienow
+if [ -z "$SKIP_STAGE_TARBALLS" ]
+then
+  tar -cvj -f "$BUILD"/system-image-$ARCH_NAME.tar.bz2 \
+    -C "$BUILD" system-image-$ARCH_NAME || dienow
+fi
 
 echo -e "=== Packaging complete\e[0m"