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 <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2016-09-23 14:29:49 -07:00 committed by Lukas Rusak
parent 322f4339a9
commit bc1419e886
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -114,7 +114,6 @@ if [ ! -f $STAMP ]; then
unset -f post_makeinstall_bootstrap unset -f post_makeinstall_bootstrap
# configure TARGET build defaults # configure TARGET build defaults
unset -v TARGET_CONFIGURE_OPTS
TARGET_CONFIGURE_OPTS="--host=$TARGET_NAME \ TARGET_CONFIGURE_OPTS="--host=$TARGET_NAME \
--build=$HOST_NAME \ --build=$HOST_NAME \
--prefix=/usr \ --prefix=/usr \
@ -127,7 +126,6 @@ if [ ! -f $STAMP ]; then
--enable-shared" --enable-shared"
# configure HOST build defaults # configure HOST build defaults
unset -v HOST_CONFIGURE_OPTS
HOST_CONFIGURE_OPTS="--host=$HOST_NAME \ HOST_CONFIGURE_OPTS="--host=$HOST_NAME \
--build=$HOST_NAME \ --build=$HOST_NAME \
--prefix=$ROOT/$TOOLCHAIN \ --prefix=$ROOT/$TOOLCHAIN \
@ -140,30 +138,10 @@ if [ ! -f $STAMP ]; then
--enable-shared" --enable-shared"
# configure INIT build defaults # configure INIT build defaults
unset -v INIT_CONFIGURE_OPTS INIT_CONFIGURE_OPTS="$TARGET_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"
# configure BOOTSTRAP build defaults # configure BOOTSTRAP build defaults
unset -v BOOTSTRAP_CONFIGURE_OPTS BOOTSTRAP_CONFIGURE_OPTS="$HOST_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"
# include buildfile # include buildfile
. $PKG_DIR/package.mk . $PKG_DIR/package.mk
@ -246,13 +224,13 @@ if [ ! -f $STAMP ]; then
fi fi
elif [ "$TARGET" = "init" ]; then elif [ "$TARGET" = "init" ]; then
if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
mkdir -p .$TARGET_NAME-init mkdir -p .$TARGET_NAME-$TARGET
cd .$TARGET_NAME-init cd .$TARGET_NAME-$TARGET
fi fi
elif [ "$TARGET" = "bootstrap" ]; then elif [ "$TARGET" = "bootstrap" ]; then
if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then if [ -f "$PKG_CONFIGURE_SCRIPT" -o -f "$PKG_CMAKE_SCRIPT" ]; then
mkdir -p .$TARGET_NAME-bootstrap mkdir -p .$HOST_NAME-$TARGET
cd .$TARGET_NAME-bootstrap cd .$HOST_NAME-$TARGET
fi fi
fi fi
@ -313,7 +291,7 @@ if [ ! -f $STAMP ]; then
elif [ "$TARGET" = "init" ]; then elif [ "$TARGET" = "init" ]; then
make install DESTDIR=$INSTALL $PKG_MAKEINSTALL_OPTS_INIT make install DESTDIR=$INSTALL $PKG_MAKEINSTALL_OPTS_INIT
elif [ "$TARGET" = "bootstrap" ]; then elif [ "$TARGET" = "bootstrap" ]; then
$MAKEINSTALL $PKG_MAKEINSTALL_OPTS_BOOTSTRAP make install $PKG_MAKEINSTALL_OPTS_BOOTSTRAP
fi fi
fi fi
if [ "$(type -t post_makeinstall_$TARGET)" = "function" ]; then if [ "$(type -t post_makeinstall_$TARGET)" = "function" ]; then