changeset 1671:d201f0baf0b6

Don't rebuild record-commands directory if build/host didn't change.
author Rob Landley <rob@landley.net>
date Fri, 15 Aug 2014 17:45:17 -0500
parents 1669660a7a97
children 3c45686b2a8a
files host-tools.sh
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/host-tools.sh	Sat Jul 12 17:04:12 2014 -0500
+++ b/host-tools.sh	Fri Aug 15 17:45:17 2014 -0500
@@ -64,8 +64,8 @@
 
 if [ "$BUILD_STATIC" != none ]
 then
-  $CC "$SOURCES/toys/hello.c" --static -o "$STAGE_DIR/hello-$$" &&
-  rm "$STAGE_DIR/hello-$$"
+  $CC "$SOURCES/toys/hello.c" --static -o "$WORK/hello-$$" &&
+  rm "$WORK/hello-$$"
 
   if [ $? -ne 0 ]
   then
@@ -132,7 +132,7 @@
 # remove the old ones.
 
 PATH="$(hosttools_path)"
-if [ -e "$BUILD"/record-commands ] && [ ! -z "$(find "$STAGE_DIR" -newer "$WORK")" ]
+if [ ! -z "$(find "$STAGE_DIR" -newer "$BUILD/record-commands" 2>/dev/null)" ]
 then
   cd "$TOP" && more/record-commands.sh || dienow
 fi
@@ -218,4 +218,10 @@
   cleanup
 fi
 
+# One more update with new packages
+if [ ! -z "$(find "$STAGE_DIR" -newer "$BUILD/record-commands" 2>/dev/null)" ]
+then
+  cd "$TOP" && more/record-commands.sh || dienow
+fi
+
 echo -e "\e[32mHost tools build complete.\e[0m"