scripts/check-compilers
author deba
Wed, 14 Mar 2007 18:01:04 +0000
changeset 2410 fe46b61da4e3
parent 2062 35e0355c6d9b
permissions -rwxr-xr-x
dim_to_lgf
- use the argparser class
arg_parser improvments
- usage of assert in cc
- const char** argv
error
- handling the string parameter
alpar@1937
     1
#!/bin/bash
alpar@1937
     2
alpar@1937
     3
set -e
alpar@1937
     4
alpar@1937
     5
function make-dir () {
alpar@1937
     6
    if [ ! -d $1 ]; then
alpar@1937
     7
	mkdir $1
alpar@1937
     8
    fi
alpar@1937
     9
}
alpar@1937
    10
alpar@1937
    11
make-dir check-compilers-dir
alpar@1937
    12
cd check-compilers-dir
alpar@1937
    13
alpar@1940
    14
svn co https://hugo.cs.elte.hu/svn/hugo/trunk ||
alpar@1940
    15
(echo '*************************************************************';
alpar@1940
    16
echo '   REPOSITORY CANNOT BE UPDATED'
alpar@1940
    17
echo '*************************************************************')
alpar@1940
    18
alpar@1937
    19
alpar@1937
    20
VERSION=r`svn info trunk|grep 'Revision:'|cut -d ' ' -f 2`
alpar@1937
    21
NAME=lemon
alpar@1937
    22
DISTNAME=${NAME}-$VERSION
alpar@1937
    23
TARNAME=${DISTNAME}.tar.gz
alpar@1937
    24
alpar@1937
    25
function makecheck () {
alpar@2279
    26
    if [ `which $(echo $CXX|cut -f1 -d' ' )` ]; then
alpar@1937
    27
	make-dir $ODIR
alpar@1937
    28
	cd $ODIR
alpar@1937
    29
	time ../trunk/configure $*
alpar@1937
    30
	time make check
alpar@1937
    31
	cd ..
alpar@1937
    32
    else
alpar@1937
    33
	echo
alpar@1937
    34
	echo '***************************************************************'
alpar@1937
    35
	echo "  COMPILER $CXX CANNOT BE FOUND"
alpar@1937
    36
	echo '***************************************************************'
alpar@1937
    37
	echo
alpar@1937
    38
    fi
alpar@1937
    39
}
alpar@1937
    40
alpar@1937
    41
# CREATE TARBALL
alpar@1937
    42
alpar@1937
    43
cd trunk
alpar@2279
    44
#./bootstrap --amver=1.7
alpar@2279
    45
autoreconf -vi
alpar@1937
    46
cd ..
alpar@1937
    47
alpar@1937
    48
# CHECK COMPILERS
alpar@1937
    49
alpar@2279
    50
ODIR=gcc-3.3 CXX=g++-3.3 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark
alpar@1937
    51
alpar@2279
    52
ODIR=gcc-3.4 CXX=g++-3.4 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark
alpar@1937
    53
alpar@2279
    54
ODIR=gcc-4.0 CXX=g++-4.0 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark
alpar@1937
    55
alpar@2279
    56
ODIR=gcc-4.1 CXX=g++-4.1 CXXFLAGS='-W -Wall -Werror' makecheck --enable-demo --enable-benchmark
alpar@2007
    57
alpar@2279
    58
# # ODIR=icc-8.0 CXX=icpc-8.0 CXXFLAGS='-Werror' makecheck --enable-demo --enable-benchmark
alpar@1940
    59
alpar@2279
    60
# ODIR=icc-9.0 CXX='icpc-9.0' CXXFLAGS='-Werror' makecheck --enable-demo --enable-benchmark
alpar@1944
    61
alpar@2279
    62
# ODIR=mingw CXX='g++' makecheck --with-msw --target=i586-mingw32msvc --host=i586-mingw32msvc --build=i386-linux --without-glpk
alpar@2062
    63
alpar@2062
    64
alpar@2062
    65
alpar@2062
    66
alpar@1937
    67
echo
alpar@1937
    68
echo '**********************************************************************'
alpar@1937
    69
echo '   REPOSITORY SEEMS OK'
alpar@1937
    70
echo '**********************************************************************'
alpar@1937
    71
echo