From bc1419e886dfc77732c6c5fc31045d6b03a0adfa Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 23 Sep 2016 14:29:49 -0700 Subject: [PATCH] scripts/build: reuse $TARGET_CONFIGURE_OPTS for $INIT_CONFIGURE_OPTS and $HOST_CONFIGURE_OPTS for $BOOTSTRAP_CONFIGURE_OPTS, rename $TARGET_NAME-init and $HOST_NAME-, cosmetics Signed-off-by: Stephan Raue --- scripts/build | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/scripts/build b/scripts/build index a7684d6a0a..6341c88b14 100755 --- a/scripts/build +++ b/scripts/build @@ -114,7 +114,6 @@ if [ ! -f $STAMP ]; then unset -f post_makeinstall_bootstrap # configure TARGET build defaults - unset -v TARGET_CONFIGURE_OPTS TARGET_CONFIGURE_OPTS="--host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -127,7 +126,6 @@ if [ ! -f $STAMP ]; then --enable-shared" # configure HOST build defaults - unset -v HOST_CONFIGURE_OPTS HOST_CONFIGURE_OPTS="--host=$HOST_NAME \ --build=$HOST_NAME \ --prefix=$ROOT/$TOOLCHAIN \ @@ -140,30 +138,10 @@ if [ ! -f $STAMP ]; then --enable-shared" # configure INIT build defaults - unset -v INIT_CONFIGURE_OPTS - INIT_CONFIGURE_OPTS="--host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-static \ - --enable-shared" + INIT_CONFIGURE_OPTS="$TARGET_CONFIGURE_OPTS" # configure BOOTSTRAP build defaults - unset -v BOOTSTRAP_CONFIGURE_OPTS - BOOTSTRAP_CONFIGURE_OPTS="--host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --libexecdir=/usr/lib \ - --localstatedir=/var \ - --disable-static \ - --enable-shared" + BOOTSTRAP_CONFIGURE_OPTS="$HOST_CONFIGURE_OPTS" # include buildfile . $PKG_DIR/package.mk @@ -246,13 +224,13 @@ if [ ! -f $STAMP ]; then fi elif [ "$TARGET" = "init" ]; then if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then - mkdir -p .$TARGET_NAME-init - cd .$TARGET_NAME-init + mkdir -p .$TARGET_NAME-$TARGET + cd .$TARGET_NAME-$TARGET fi elif [ "$TARGET" = "bootstrap" ]; then if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then - mkdir -p .$TARGET_NAME-bootstrap - cd .$TARGET_NAME-bootstrap + mkdir -p .$HOST_NAME-$TARGET + cd .$HOST_NAME-$TARGET fi fi @@ -313,7 +291,7 @@ if [ ! -f $STAMP ]; then elif [ "$TARGET" = "init" ]; then make install DESTDIR=$INSTALL $PKG_MAKEINSTALL_OPTS_INIT elif [ "$TARGET" = "bootstrap" ]; then - $MAKEINSTALL $PKG_MAKEINSTALL_OPTS_BOOTSTRAP + make install $PKG_MAKEINSTALL_OPTS_BOOTSTRAP fi fi if [ "$(type -t post_makeinstall_$TARGET)" = "function" ]; then