buildframework/helium/hlm
author timothy.murphy@nokia.com
Sat, 01 May 2010 00:09:59 +0100
branchfix
changeset 516 cd8318d5fb3a
parent 217 0f5e3a7fb6af
child 587 85df38eb4012
permissions -rw-r--r--
Somewhat more sane choice of directory. Fix problem where winscw migh have had wrong TARGETEXT var.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     1
#!/bin/bash
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     3
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     4
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     5
# All rights reserved.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     6
# This component and the accompanying materials are made available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     7
# under the terms of the License "Eclipse Public License v1.0"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     8
# which accompanies this distribution, and is available
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
     9
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    10
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    11
# Initial Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    12
# Nokia Corporation - initial contribution.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    13
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    14
# Contributors:
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    15
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    16
# Description: 
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    17
#
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    18
if [ ! $HELIUM_HOME ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    19
    export HELIUM_HOME=$(dirname $(readlink /proc/$$/fd/255))
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    20
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    21
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    22
# For nokia specific enviroment configurations.
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    23
if [ -f $HELIUM_HOME/extensions/nokia/env.sh ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    24
    . $HELIUM_HOME/extensions/nokia/env.sh
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    25
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    26
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    27
export LANG="en_US.UTF-8"
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    28
export ANT_ARGS="-lib $HELIUM_HOME/extensions/nokia/external/antlibs -lib $HELIUM_HOME/extensions/nokia/external/helium-nokia-antlib/bin -lib $HELIUM_HOME/external/helium-antlib/bin -lib $HELIUM_HOME/external/antlibs -lib $HELIUM_HOME/tools/common/java/lib -logger com.nokia.ant.HeliumLogger -Dant.executor.class=com.nokia.helium.core.ant.HeliumExecutor -listener com.nokia.helium.diamonds.ant.HeliumListener -listener com.nokia.helium.logger.ant.listener.StatusAndLogListener -listener com.nokia.helium.core.ant.listener.TargetTimesLogGeneratorListener"
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    29
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    30
PYTHON_VERSION=`python -c "import sys; print sys.version[:3]"`
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    31
PYTHON_VERSION2=$PYTHON_VERSION$HOSTTYPE
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    32
PYTHONLIB=$HELIUM_HOME/external/python/lib/linux/$PYTHON_VERSION2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    33
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    34
TEMP_PYTHONPATH="$PYTHONLIB:$HELIUM_HOME/external/python/lib/common:$HELIUM_HOME/external/helium-antlib/python/pythoncore/lib:$HELIUM_HOME/tools/common/python/scripts:$HELIUM_HOME/extensions/nokia/external/python/lib/2.5:$HELIUM_HOME/extensions/nokia/tools/common/python/lib:$HELIUM_HOME/extensions/nokia/external/helium-nokia-antlib/python:$HELIUM_HOME/extensions/nokia/external/helium-nokia-antlib/python/pythonnokia/lib"
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    35
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    36
TEMP_PERL5LIB="$HELIUM_HOME/tools/common/packages"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    37
if [ ! $PERL5LIB ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    38
    PERL5LIB=$TEMP_PERL5LIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    39
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    40
    PERL5LIB="$PERL5LIB:$TEMP_PERL5LIB"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    41
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    42
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    43
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    44
if [ $HOST ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    45
    export COMPUTERNAME=$HOST
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    46
elif [ $HOSTNAME ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    47
    export COMPUTERNAME=$HOSTNAME
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    48
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    49
    export COMPUTERNAME=$(hostname)
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    50
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    51
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    52
CWD=`pwd`
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    53
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    54
if [ ! -e "$PYTHONLIB" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    55
    mkdir $PYTHONLIB
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    56
    cp $HELIUM_HOME/external/python/lib/common/site.py $PYTHONLIB
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    57
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    58
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    59
export PYTHONPATH=$HELIUM_HOME/external/python/lib/common/setuptools-0.6c5-py2.5.egg
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    60
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    61
if [ ! -e "$PYTHONLIB/4Suite_XML-1.0.2.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    62
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    63
    tar xvfz $HELIUM_HOME/external/python/lib/linux/4Suite-XML-1.0.2.tar.gz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    64
    cd $PYTHONLIB/4Suite-XML-1.0.2
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    65
    python setup.py bdist_egg > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    66
    mv dist/*.egg $PYTHONLIB/4Suite_XML-1.0.2.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    67
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    68
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    69
if [ ! -e "$PYTHONLIB/lxml-1.3.6.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    70
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    71
    tar xvfz $HELIUM_HOME/external/python/lib/linux/lxml-1.3.6.tgz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    72
    cd $PYTHONLIB/lxml-1.3.6
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    73
    python setup.py bdist_egg > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    74
    mv dist/*.egg $PYTHONLIB/lxml-1.3.6.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    75
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    76
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    77
if [ ! -e "$PYTHONLIB/PyXML-0.8.4.egg" ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    78
    cp $HELIUM_HOME/external/python/lib/linux/easy-install.pth $PYTHONLIB
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    79
    tar xvfz $HELIUM_HOME/external/python/lib/linux/PyXML-0.8.4.tar.gz -C $PYTHONLIB > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    80
    cd $PYTHONLIB/PyXML-0.8.4
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    81
    python setup.py bdist > /dev/null
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    82
    mv build/lib* $PYTHONLIB/PyXML-0.8.4.egg
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    83
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    84
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    85
cd $CWD
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
    86
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    87
if [ ! $PYTHONPATH ] ; then
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    88
    export PYTHONPATH=$TEMP_PYTHONPATH
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    89
else
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    90
    export PYTHONPATH="$PYTHONPATH:$TEMP_PYTHONPATH"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    91
fi
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    92
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    93
TEMP_JYTHONPATH="$HELIUM_HOME/external/python/lib/2.5/jython-2.5-py2.5.egg:$PYTHONPATH"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    94
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    95
if [ ! $JYTHONPATH ] ; then
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    96
    export JYTHONPATH=$TEMP_JYTHONPATH
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    97
else
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    98
    export JYTHONPATH="$JYTHONPATH:$TEMP_JYTHONPATH"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
    99
fi
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   100
179
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   101
export USERNAME=$USER
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   102
export SYMSEE_VERSION="not_in_use"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   103
export PID=$$
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   104
export TEMP="/tmp/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   105
if [ $JOB_ID ] ; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   106
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER/$JOB_ID"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   107
else
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   108
    export HELIUM_CACHE_DIR="$TEMP/helium/$USER"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   109
fi
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   110
export ANT_OPTS="-Dlog4j.configuration=com/nokia/log4j.xml -Dlog4j.cache.dir=$HELIUM_CACHE_DIR"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   111
export PYTHON_CACHEDIR="$HELIUM_CACHE_DIR/python"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   112
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   113
mkdir -p $HELIUM_CACHE_DIR
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   114
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   115
if [ ! $EPOCROOT ]; then
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   116
    export EPOCROOT="/"
d8ac696cc51f helium_7.0-r14027
wbernard
parents:
diff changeset
   117
fi 
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   118
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   119
if [ ! -f "$HELIUM_HOME/external/helium-antlib/bin/helium-checktools.jar" ] ; then
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   120
    echo helium-checktools.jar not found
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   121
else 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   122
    java -cp "$HELIUM_HOME/external/helium-antlib/bin/helium-checktools.jar" com.nokia.helium.checktools.HeliumToolsCheckerMain -config "$HELIUM_HOME/config/helium.basic.tools.config"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   123
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   124
    if [ $? -eq 0 ] ; then
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   125
      exec ant -Dpython.cachedir=$PYTHON_CACHEDIR -Dhelium.dir=$HELIUM_HOME -Dpython.path=$PYTHONPATH -Dcache.dir=$HELIUM_CACHE_DIR $*
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   126
    else
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   127
        echo Build aborted with error
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   128
    fi    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents: 179
diff changeset
   129
fi