Changeset 36341


Ignore:
Timestamp:
2022-07-29T11:35:00+12:00 (2 weeks ago)
Author:
kjdon
Message:

a bit of tidying and better reporting. also make it use bash, as don't work for sh

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/build-src/packages/configure

    r36339 r36341  
    1 #! /bin/sh
     1#! /bin/bash
    22
    33PACKAGES=`pwd`
     
    181181ssl_status=-1
    182182if [[ "x$GSDLOS" == "xdarwin" ]] && [[ `uname -m` == *"64" ]] ; then
     183    echo Darwin 64, using darwin64-x86_64-cc for OPENSSL_HOST
    183184    export CC="gcc"
    184185    export CXX="g++"
     
    187188    ./Configure --openssldir=$PACKAGES/openssl no-shared darwin64-x86_64-cc
    188189    ssl_status=$?
    189 elif [[ "x$RK32" != "x" ]] ; then
    190     echo "in RK32 mode"
    191     echo ./Configure --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl  no-shared linux-generic32
     190   
     191elif [[ "x$OPENSSL_HOST" != "x" ]] ; then
     192    echo "have found environment variable OPENSSL_HOST - using that with Configure, instead of running config which will guess the host"
     193    echo ./Configure --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl  no-shared $OPENSSL_HOST
    192194    # we found that the following needs bash to run as running it directly here (from within ant)
    193195    # as ./Configure had an error, even though the command worked fine on the command line
    194     bash ./Configure --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl  no-shared linux-generic32
     196    ./Configure --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl  no-shared $OPENSSL_HOST
    195197    ssl_status=$?
    196198
     
    198200    # this will auto guess the system you are running on
    199201     echo ./config --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl no-shared
    200     ./config --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl no-shared
     202     ./config --prefix=$PACKAGES/openssl --openssldir=$PACKAGES/openssl no-shared
    201203    ssl_status=$?
    202204fi
    203 if [[ $ssl_status != 0 ]] ; then
    204     echo "ERROR: something went wrong with configuring openssl"
     205
     206if [ $ssl_status != 0 ] ; then
     207    echo "ERROR: something went wrong with configuring openssl, returning $ssl_status"
    205208    exit $ssl_status
    206209fi
     210
    207211# make
    208 echo make
     212echo Making OpenSSL
     213
    209214make
    210215# make 'install_sw' is a target this package has for installing just the software,
Note: See TracChangeset for help on using the changeset viewer.