Commit 7d0864e5 authored by Simon Brass's avatar Simon Brass
Browse files

[gcc-build] make error analysis simpler

parent 79ecb180
#!/bin/bash
function error_exit
{
echo "$1" 1>&2
exit 1
}
set -x
TAR_FILE=`ls *.tar.bz2`
SRC=source
......@@ -19,23 +25,13 @@ export C_INCLUDE_PATH
CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
export CPLUS_INCLUDE_PATH
tar jxf $TAR_FILE
tar jxf $TAR_FILE || error_exit "Extracting GCC failed. Abort."
mv $INST_DIR $SRC
mkdir $INST_DIR
cd $INST_DIR
../$SRC/configure --enable-languages=c,c++,fortran --disable-multilib -prefix=$PREFIX > configure.log
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi
make $HOST_MAKE_FLAGS -s V=0 2>&1 | tee make.log
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi
../$SRC/configure --enable-languages=c,c++,fortran --disable-multilib -prefix=$PREFIX > configure.log || error_exit "Configuration failed. Abort."
make $HOST_MAKE_FLAGS -s V=0 > make.log || error_exit "Make failed. Abort."
mkdir -p $DEST_DIR/$PREFIX/lib
cd $DEST_DIR/$PREFIX
......@@ -43,11 +39,7 @@ cd $DEST_DIR/$PREFIX
ln -s lib lib64
cd $WORKSPACE/$INST_DIR
make $HOST_MAKE_FLAGS DESTDIR=$DEST_DIR -s V=0 install 2>&1 | tee make-install.log
exit_code=$?
if [ $exit_code -ne 0 ]
then exit $exit_code
fi
make $HOST_MAKE_FLAGS DESTDIR=$DEST_DIR -s V=0 install > make-install.log || exit_error "Make install failed. Abort."
cd ..
rm -rf $INST_DIR
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment