Mercurial > hg > aboriginal
comparison mini-native.sh @ 685:90ab1a1f4db5
Teach build not to rebuild base architecture toolchains. Factor out some common code while there.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 01 Apr 2009 04:11:44 -0500 |
parents | 4571f63c2298 |
children | aad5da0c7454 |
comparison
equal
deleted
inserted
replaced
684:222886c9b3f5 | 685:90ab1a1f4db5 |
---|---|
4 | 4 |
5 source sources/include.sh || exit 1 | 5 source sources/include.sh || exit 1 |
6 | 6 |
7 # Purple. And why not? | 7 # Purple. And why not? |
8 echo -e "$NATIVE_COLOR" | 8 echo -e "$NATIVE_COLOR" |
9 | |
10 check_for_base_arch mini-native || exit 0 | |
11 | |
9 echo "=== Building minimal native development environment" | 12 echo "=== Building minimal native development environment" |
10 | 13 |
11 rm -rf "${NATIVE_ROOT}" | 14 rm -rf "${NATIVE_ROOT}" |
12 | 15 |
13 # Determine which directory layout we're using | 16 # Determine which directory layout we're using |
300 # Clean up and package the result | 303 # Clean up and package the result |
301 | 304 |
302 "${ARCH}-strip" "${TOOLS}"/{bin/*,sbin/*,libexec/gcc/*/*/*} | 305 "${ARCH}-strip" "${TOOLS}"/{bin/*,sbin/*,libexec/gcc/*/*/*} |
303 "${ARCH}-strip" --strip-unneeded "${TOOLS}"/lib/*.so | 306 "${ARCH}-strip" --strip-unneeded "${TOOLS}"/lib/*.so |
304 | 307 |
305 if [ -z "$SKIP_STAGE_TARBALLS" ] | 308 create_stage_tarball mini-native |
306 then | |
307 echo -n creating mini-native-"${ARCH}".tar.bz2 && | |
308 cd "${BUILD}" && | |
309 { tar cjvf "mini-native-${ARCH}.tar.bz2" "mini-native-${ARCH}" || dienow | |
310 } | dotprogress | |
311 | |
312 # If we're building something with a $BASE_ARCH, symlink to target name. | |
313 | |
314 if [ "$ARCH" != "$ARCH_NAME" ] | |
315 then | |
316 rm -rf "mini-native-$ARCH_NAME"{,.tar.bz2} && | |
317 ln -s mini-native-"$ARCH" mini-native-"$ARCH_NAME" && | |
318 ln -s mini-native-"$ARCH".tar.bz2 mini-native-"$ARCH_NAME".tar.bz2 || | |
319 dienow | |
320 fi | |
321 fi | |
322 | |
323 | 309 |
324 # Color back to normal | 310 # Color back to normal |
325 echo -e "\e[0mBuild complete" | 311 echo -e "\e[0mBuild complete" |