Changeset 28513


Ignore:
Timestamp:
10/22/13 20:46:21 (7 years ago)
Author:
ak19
Message:

Overhaul of makegs2.sh script: now, instead of doing the logic around whether it needs to compile gnome-lib itself, it just runs configure with the additional enable-gnome-lib-ext flag if the gnome-lib parameter to this script is passed in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/makegs2.sh

    r28507 r28513  
    22
    33# run as: ./makegs2.sh
    4 # or ./makegs2.sh gnome-lib to check out gnome-lib src from svn
     4# or ./makegs2.sh gnome-lib to compile GS2 using gnome-lib
     5# which checks out gnome-lib src from svn if needed and if possible
    56
    6 # NOT SUPPORTED YET: or run as ./makegs2.sh min
    7 # to check out gnome-lib minimal binary from svn (won't be working out
    8 # which minimal version is required for now, 32/64 bit, linux/darwin)
    9 
     7docheckout=$1
    108gsdlhome=`pwd`
    119echo "**** GSDLHOME: $gsdlhome"
    12 docheckout=$1
    1310
    14 gnomelibsrc=$gsdlhome/ext/gnome-lib
    15 gnomelibbin=$gsdlhome/ext/gnome-lib-minimal
    16 gnomelib=
    17 
    18 
    19 # 1. grab gnome-lib src (or bin eventually) from svn if told to
     11# Compile by chaining the commands with && so it stops at that stage after an error
     12cd $gsdlhome
    2013if [ "x$docheckout" = "xgnome-lib" ]; then
    21     if [ ! -d "$gnomelibsrc" ]; then
    22     echo "**** $gnomelibsrc doesn't yet exist. Checking out from SVN..."
    23     svn co http://svn.greenstone.org/gs2-extensions/gnome-lib/trunk/src ext/gnome-lib
    24     fi
    25 #elif [ "x$docheckout" = "xmin" ]; then
    26 # work out os and bit-architecture
    27 # and then can get the correct gnome-lib bin version for this from svn
     14    ./configure --enable-gnome-lib-ext --enable-apache-httpd \
     15    && make \
     16    && make install
     17else
     18    ./configure --enable-apache-httpd \
     19    && make \
     20    && make install
    2821fi
    29 
    30 
    31 # 2. compile gnome-lib if we need to
    32 if [ -d "$gnomelibbin" ]; then
    33 
    34     echo "**** Found a gnomelib binary"
    35     gnomelib=$gnomelibbin
    36 
    37 elif [ -d "$gnomelibsrc" ]; then
    38 
    39     echo "**** Found a gnomelib src folder"
    40     gnomelib=$gnomelibsrc
    41 
    42     if [ -d "$gnomelibsrc/linux" ]; then
    43     echo "*** gnomelib already compiled up in $gnomelibsrc/linux"
    44     else
    45     echo "*** Going to compile up the $gnomelibsrc folder"
    46     cd $gnomelib
    47     ./CASCADE-MAKE.sh
    48     gnomestatus=$?
    49     if [ $gnomestatus != 0 ] ; then
    50         echo "****************************************"
    51         echo "@@@ Failed to compile up gnomelib successfully"       
    52         echo "****************************************"
    53         exit -1
    54     fi
    55     #cd $gsdlhome
    56     fi
    57 else
    58     echo "@@@@ No gnome-lib found.... Proceding to compile without it..."
    59     echo "@@@@ Assuming this is what you want (Ctrl-C to cancel compilation)"
    60     echo "@@@@ If you do need gnomelib, (eg if you find wvware won't compile)"
    61     echo "@@@@ you can run this script like './makegs2.sh gnome-lib'"
    62     sleep 6
    63 fi
    64 
    65 
    66 # 3. set up compiling environment to use gnome-lib, if there is a gnome-lib
    67 if [ ! -z "$gnomelib" ] ; then
    68     echo "***** gnomelib folder: $gnomelib"
    69     cd $gnomelib
    70     source devel.bash
    71     #cd $gsdlhome
    72 fi
    73 
    74 
    75 # 4. now can compile as usual, having set up the environment for wvware
    76 # chain the commands with && so it stops at that stage after an error
    77 cd $gsdlhome
    78 ./configure --enable-apache-httpd \
    79   && make \
    80   && make install
    8122
    8223status=$?
     
    8526    # 5. Message to warn user that the env of this x-term uses gnome-lib
    8627    # and GUIs may not work from this console
    87 
    88     echo "*** The environment for this console has been set to compile Greenstone with gnome-lib."
    89     echo "*** As a result, graphical applications may not work well."
    90     echo "*** In such a case, open a new console."
    91 
     28    if [ "x$docheckout" = "xgnome-lib" ]; then
     29    echo "*** The environment for this console has been set to compile Greenstone with gnome-lib."
     30    echo "*** As a result, graphical applications may not work well."
     31    echo "*** In such a case, open a new console."
     32    else
     33    echo "Finished compiling Greenstone2. (Compiled without gnome-lib)"
     34    fi
    9235else
    9336    echo "@@@ Error compiling up Greenstone. Return status: $status"
Note: See TracChangeset for help on using the changeset viewer.