Mercurial > hg > aboriginal
diff sources/functions.sh @ 783:db06a8c1bfed
Lots of changes to move buildall.sh functionality into build.sh.
Upgrade build.sh to be able to create static cross compilers and static native compilers via canadian cross. Teach build stages to use $STAGE_NAME for their output directory (and tarballs, and === notifications). Remove LFS style /tools support (since host-tools.sh performs an equivalent cleaning step and it's a pain to maintain it), add ROOT_NODIRS instead.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 05 Jul 2009 17:50:44 -0500 |
parents | e373d2b6d0b8 |
children | 23bff7aa79eb |
line wrap: on
line diff
--- a/sources/functions.sh Sun Jul 05 17:30:01 2009 -0500 +++ b/sources/functions.sh Sun Jul 05 17:50:44 2009 -0500 @@ -48,14 +48,12 @@ # Setup directories and add the cross compiler to the start of the path. - [ -z "$NATIVE_ROOT" ] && export NATIVE_ROOT="${BUILD}/root-filesystem-$ARCH" + STAGE_DIR="$BUILD/${STAGE_NAME}-${ARCH}" + export PATH="${BUILD}/cross-compiler-$ARCH/bin:$PATH" [ "$FROM_ARCH" != "$ARCH" ] && PATH="${BUILD}/cross-compiler-${FROM_ARCH}/bin:$PATH" - [ ! -z "${NATIVE_TOOLSDIR}" ] && TOOLS="${NATIVE_ROOT}/tools" || - TOOLS="${NATIVE_ROOT}/usr" - return 0 } @@ -524,13 +522,13 @@ # If we're building something with a base architecture, symlink to actual # target. - if [ "$ARCH" != "$ARCH_NAME" ] && [ -e "$BUILD/$1-$ARCH" ] + if [ "$ARCH" != "$ARCH_NAME" ] && [ -e "$BUILD/$STAGE_NAME-$ARCH" ] then - echo === Using existing $1-"$ARCH" + echo === Using existing $STAGE_NAME-"$ARCH" - link_arch_name $1-{"$ARCH","$ARCH_NAME"} - [ -e $1-"$ARCH".tar.bz2 ] && - link_arch_name $1-{"$ARCH","$ARCH_NAME"}.tar.bz2 + link_arch_name $STAGE_NAME-{"$ARCH","$ARCH_NAME"} + [ -e $STAGE_NAME-"$ARCH".tar.bz2 ] && + link_arch_name $STAGE_NAME-{"$ARCH","$ARCH_NAME"}.tar.bz2 return 1 fi @@ -541,16 +539,16 @@ # Handle linking to base architecture if we just built a derivative target. cd "$BUILD" || dienow - link_arch_name $1-{$ARCH,$ARCH_NAME} + link_arch_name $STAGE_NAME-{$ARCH,$ARCH_NAME} if [ -z "$SKIP_STAGE_TARBALLS" ] then - echo -n creating "$1-${ARCH}".tar.bz2 + echo -n creating "$STAGE_NAME-${ARCH}".tar.bz2 - { tar cjvf "$1-${ARCH}".tar.bz2 "$1-${ARCH}" || dienow + { tar cjvf "$STAGE_NAME-${ARCH}".tar.bz2 "$STAGE_NAME-${ARCH}" || dienow } | dotprogress - link_arch_name $1-{$ARCH,$ARCH_NAME}.tar.bz2 + link_arch_name $STAGE_NAME-{$ARCH,$ARCH_NAME}.tar.bz2 fi }