Use the functions from functions.sh in the install_toolchain script.

This commit is contained in:
Christoph Niethammer 2011-03-23 11:27:26 +00:00
parent 49d34c7dc5
commit 74c2549899
2 changed files with 6 additions and 40 deletions

View file

@ -49,7 +49,9 @@ sit_unpack() {
src_configure() { src_configure() {
${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS ${SRCDIR}/configure --prefix=$PREFIX $CONFIGURE_OPTS
if [ ! -z $LOGDIR ] ; then
cp config.log $LOGDIR cp config.log $LOGDIR
fi
} }
sit_configure() { sit_configure() {
sit_info "Configuring sources ..." sit_info "Configuring sources ..."

View file

@ -6,6 +6,8 @@
set -e set -e
set -x set -x
source "functions.sh"
export ORIGDIR=`pwd` export ORIGDIR=`pwd`
export SIT_DIR=$(dirname "$ORIGDIR/$0") export SIT_DIR=$(dirname "$ORIGDIR/$0")
echo $SIT_DIR echo $SIT_DIR
@ -27,45 +29,6 @@ LIBTOOL_VERSION=2.2.10
AUTOCONF_VERSION=2.65 AUTOCONF_VERSION=2.65
AUTOMAKE_VERSION=1.11.1 AUTOMAKE_VERSION=1.11.1
function sit_fail() {
msg=$0
echo "$msg"
exit 1
}
function sit_unpack() {
if [ ! -e ${SRC_POOL}/${A} ]
then
sit_fail "${SRC_POOL}/${A} doesn't exist"
fi
case "${A##*.}" in
bz2)
tar xfjv ${SRC_POOL}/${A} || sit_fail
;;
gz|tgz)
tar xfzv ${SRC_POOL}/${A} || sit_fail
;;
xz)
tar xfJv ${SRC_POOL}/${A} || sit_fail
;;
*)
sit_fail "Archive format not recogized"
;;
esac
}
function sit_configure() {
cd ${BUILDDIR=}
${SRCDIR}/configure --prefix=$PREFIX
}
function sit_build() {
make $MAKEOPTS
}
function sit_install() {
make install
}
function sit_auto_install() { function sit_auto_install() {
export WORKDIR=$WORKDIR_BASE/${P} export WORKDIR=$WORKDIR_BASE/${P}
@ -77,6 +40,7 @@ function sit_auto_install() {
fi fi
mkdir -p ${WORKDIR} mkdir -p ${WORKDIR}
mkdir -p ${BUILDDIR} mkdir -p ${BUILDDIR}
mkdir -p ${PREFIX}
cd ${WORKDIR} cd ${WORKDIR}
sit_unpack sit_unpack
sit_configure sit_configure