diff host-tools.sh @ 120:c91ceb05bc1c

Make host-tools not rebuild stuff that's already there, fix yet more corner cases in which the ldd/readelf build breaks, and let CROSS_TARGET be set manually by config files.
author Rob Landley <rob@landley.net>
date Sun, 04 Mar 2007 16:15:58 -0500
parents b66d638a3844
children da91da84e7de
line wrap: on
line diff
--- a/host-tools.sh	Sun Mar 04 16:12:49 2007 -0500
+++ b/host-tools.sh	Sun Mar 04 16:15:58 2007 -0500
@@ -8,24 +8,29 @@
 NO_ARCH=1
 source include.sh
 
-rm -rf "${HOSTTOOLS}"
+#rm -rf "${HOSTTOOLS}"
 mkdir -p "${HOSTTOOLS}" || dienow
 
 # Build toybox
+if [ ! -f "$(which toybox)" ]
+then
+echo which toybox
+  setupfor toybox &&
+  make defconfig &&
+  make &&
+  make instlist &&
+  make install_flat PREFIX="${HOSTTOOLS}"
 
-setupfor toybox &&
-make defconfig &&
-make &&
-make instlist &&
-make install_flat PREFIX="${HOSTTOOLS}"
-
-[ $? -ne 0 ] && dienow
+  [ $? -ne 0 ] && dienow
+fi
 
 # As a temporary measure, build User Mode Linux and use _that_ to package
 # the ext2 image to boot qemu with.
 
-setupfor linux &&
-cat > mini.conf << EOF
+if [ -z "$(which linux)" ]
+then
+  setupfor linux &&
+  cat > mini.conf << EOF
 CONFIG_MODE_SKAS=y
 CONFIG_BINFMT_ELF=y
 CONFIG_HOSTFS=y
@@ -37,13 +42,14 @@
 CONFIG_EXT2_FS=y
 CONFIG_PROC_FS=y
 EOF
-make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf &&
-make ARCH=um &&
-cp linux "${HOSTTOOLS}" &&
-cd .. &&
-rm -rf linux-*
+  make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf &&
+  make ARCH=um &&
+  cp linux "${HOSTTOOLS}" &&
+  cd .. &&
+  rm -rf linux-*
 
-[ $? -ne 0 ] && dienow
+  [ $? -ne 0 ] && dienow
+fi
 
 # Build squashfs
 #setupfor squashfs