Mercurial > hg > aboriginal
comparison host-tools.sh @ 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 | 946d9e8f1752 |
children | 263bb9ff9657 |
comparison
equal
deleted
inserted
replaced
1670:1669660a7a97 | 1671:d201f0baf0b6 |
---|---|
62 | 62 |
63 # Sanity test for the host supporting static linking. | 63 # Sanity test for the host supporting static linking. |
64 | 64 |
65 if [ "$BUILD_STATIC" != none ] | 65 if [ "$BUILD_STATIC" != none ] |
66 then | 66 then |
67 $CC "$SOURCES/toys/hello.c" --static -o "$STAGE_DIR/hello-$$" && | 67 $CC "$SOURCES/toys/hello.c" --static -o "$WORK/hello-$$" && |
68 rm "$STAGE_DIR/hello-$$" | 68 rm "$WORK/hello-$$" |
69 | 69 |
70 if [ $? -ne 0 ] | 70 if [ $? -ne 0 ] |
71 then | 71 then |
72 echo "Your host toolchain does not support static linking." >&2 | 72 echo "Your host toolchain does not support static linking." >&2 |
73 echo "Either install support, or export BUILD_STATIC=none" >&2 | 73 echo "Either install support, or export BUILD_STATIC=none" >&2 |
130 | 130 |
131 # We now have all the tools we need in $STAGE_DIR, so trim the $PATH to | 131 # We now have all the tools we need in $STAGE_DIR, so trim the $PATH to |
132 # remove the old ones. | 132 # remove the old ones. |
133 | 133 |
134 PATH="$(hosttools_path)" | 134 PATH="$(hosttools_path)" |
135 if [ -e "$BUILD"/record-commands ] && [ ! -z "$(find "$STAGE_DIR" -newer "$WORK")" ] | 135 if [ ! -z "$(find "$STAGE_DIR" -newer "$BUILD/record-commands" 2>/dev/null)" ] |
136 then | 136 then |
137 cd "$TOP" && more/record-commands.sh || dienow | 137 cd "$TOP" && more/record-commands.sh || dienow |
138 fi | 138 fi |
139 | 139 |
140 # This is optionally used by root-filesystem to accelerate native builds when | 140 # This is optionally used by root-filesystem to accelerate native builds when |
216 rm ../../{z*.h,libz.a} | 216 rm ../../{z*.h,libz.a} |
217 | 217 |
218 cleanup | 218 cleanup |
219 fi | 219 fi |
220 | 220 |
221 # One more update with new packages | |
222 if [ ! -z "$(find "$STAGE_DIR" -newer "$BUILD/record-commands" 2>/dev/null)" ] | |
223 then | |
224 cd "$TOP" && more/record-commands.sh || dienow | |
225 fi | |
226 | |
221 echo -e "\e[32mHost tools build complete.\e[0m" | 227 echo -e "\e[32mHost tools build complete.\e[0m" |