gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] small script to build download, build and test gm2


From: Gaius Mulley
Subject: [Gm2] small script to build download, build and test gm2
Date: Fri, 06 Dec 2013 17:45:58 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi,

not sure how useful this might be, but here is a small script which
will download, configure, make and run the regression tests for either
branch 4.1.2 / 4.7.3 of gm2.  (Used on Debian Wheezy x86_64)

A word of caution though (point 2)

  (*)  expects $HOME/GM2 to be present
  (*)  it will rm -rf scratch-area within $HOME/GM2
       and then mkdir scratch-area and performs everything under
       that directory.
  (*)  it does not install anything

regards,
Gaius



#!/bin/bash

export PATH=/usr/bin:$PATH
echo path set to ${PATH}

echo "press enter to continue if the path is correct"
read ans

LANGUAGES=c,c++,gm2
cd $HOME/GM2

GCC=$1

if [ "${GCC}" == "" ] ; then
    echo "You must specify which gcc release you want to download, currently 
supported are:  4.1.2 and 4.7.3"
    exit 1
fi

if [ ! -d $HOME/GM2 ] ; then
    echo "no $HOME/GM2 found"
    exit 1
fi

rm -rf scratch-area
mkdir scratch-area
cd scratch-area

if ! wget 
http://floppsie.comp.glam.ac.uk/download/c/gcc-${GCC}+gm2-git-latest.tar.gz ; 
then
    echo "unable to download gm2 grafted onto gcc-${GCC}"
    exit 2
fi

tar zxf gcc-${GCC}+gm2-git-latest.tar.gz
rm -rf build-${GCC}
mkdir build-${GCC}
cd build-${GCC}

if [ "$GCC" == "4.7.3" ] ; then
    ../gcc-${GCC}+gm2-git-latest/gm2/gcc-versionno/configure --prefix=$HOME/opt 
\
    --enable-languages=${LANGUAGES} \
    --libexecdir=$HOME/opt/lib --enable-shared \
    --enable-threads=posix --enable-__cxa_atexit \
    --enable-clocale=gnu \
    --disable-multilib --disable-bootstrap \
    --enable-checking --enable-libgm2
fi
if [ "$GCC" == "4.1.2" ] ; then
     CFLAGS=-B/usr/lib/x86_64-linux-gnu
     export CFLAGS
     LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
     export LIBRARY_PATH
     ../gcc-${GCC}+gm2-git-latest/gm2/gcc-versionno/configure 
--enable-languages=c,c++,gm2 \
     --disable-multilib --enable-checking=all --prefix=$HOME/opt
fi

time ( ( make "SHELL=/bin/bash" && cd gcc && make check-gm2 ) >& build-log < 
/dev/null ) &
sleep 3
tail -f build-log





reply via email to

[Prev in Thread] Current Thread [Next in Thread]