Changeset 5617

Show
Ignore:
Timestamp:
10/29/09 14:40:01 (4 weeks ago)
Author:
balaji
Message:

Allow --with-libtool option and MPICH2_LIBTOOL_DIR environment for
maint/updatefiles.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/maint/updatefiles

    r5611 r5617  
    3939MAKE=${MAKE-make} 
    4040 
     41ltdirs="src/pm/hydra/tools/bind/hwloc/hwloc" 
    4142amdirs="src/openpa src/pm/hydra src/mpl" 
    4243 
     
    4647stepsCleared=no 
    4748 
    48 # Options for some steps 
    49 autoconfdir="" 
    50 automakedir="" 
    51 autotoolsdir="" 
    5249# Extract defaults from the environment 
    53 if [ "x$MPICH2_AUTOCONF_DIR" != "x" ] ; then  
    54     autoconfdir=$MPICH2_AUTOCONF_DIR 
    55 fi 
    56 if [ "x$MPICH2_AUTOMAKE_DIR" != "x" ] ; then  
    57     automakedir=$MPICH2_AUTOMAKE_DIR 
    58 fi 
    59 if [ "x$MPICH2_AUTOTOOLS_DIR" != "x" ] ; then  
    60     autotoolsdir=$MPICH2_AUTOTOOLS_DIR 
    61 fi 
    62 # 
     50autoconfdir=$MPICH2_AUTOCONF_DIR 
     51automakedir=$MPICH2_AUTOMAKE_DIR 
     52libtooldir=$MPICH2_LIBTOOL_DIR 
     53autotoolsdir=$MPICH2_AUTOTOOLS_DIR 
     54 
    6355# Extract the arguments intended for updatefiles.  Any others are 
    6456# given to simplemake.   
     
    131123    automakedir=`echo "A$arg" | sed -e 's/.*=//'` 
    132124    ;; 
     125    -with-libtool=*|--with-libtool=*) 
     126    libtooldir=`echo "A$arg" | sed -e 's/.*=//'` 
     127    ;; 
    133128    -with-autotools=*|--with-autotools=*) 
    134129    autotoolsdir=`echo "A$arg" | sed -e 's/.*=//'` 
     
    144139    cat <<EOF 
    145140    updatefiles [ --with-autoconf=dir ] [ --with-automake=dir ] \\ 
    146                 [ --with-autotools=dir ] [ --do=stepname ]      \\ 
    147                 [ args for simplemake ]  
     141                [ --with-libtool=dir ] [ --with-autotools=dir ] \\ 
     142                [ --do=stepname ] [ args for simplemake ] 
    148143    Update the files in the MPICH2 build tree.  This file builds the  
    149144    configure files, creates the Makefile.in files (using the simplemake 
    150145    program), extracts the error messages. 
    151146 
    152     You can use --with-autoconf=dir to specify a directory that contains 
    153     an alternate autoconf and autoheader.  Similarly --with-automake can 
    154     be used to specify the location of automake and aclocal.  If 
    155     autoconf and automake are installed in the same location, they can 
    156     be specified by the --with-autotools option. 
     147    You can use --with-autoconf=dir to specify a directory that 
     148    contains an alternate autoconf and autoheader.  Similarly 
     149    --with-automake can be used to specify the location of automake 
     150    and aclocal and --with-libtool to specify the location of 
     151    libtoolize. If all the autotools are installed in the same 
     152    location, they can be specified by the --with-autotools option. 
    157153 
    158154    Use --do=stepname to update only a single step.  For example,  
     
    173169 
    174170if [ -n "$autotoolsdir" ] ; then 
    175     if [ -n "$autoconfdir" -o -n "$automakedir" ] ; then 
    176         # Don't permit --with-autotools together with either --with-autoconf or 
    177         # --with-automake because which argument takes precedence is not obvious 
    178         # without immediate explanation.  --with-autotools is really only 
    179         # present to make life a little easier for those who preferred the old 
    180         # behavior where --with-autoconf was used to specify the location of 
    181         # both autoconf and automake. 
     171    if [ -n "$autoconfdir" -o -n "$automakedir" -o -n "$libtooldir" ] ; then 
     172        # Don't permit --with-autotools together with --with-autoconf, 
     173        # --with-automake or --with-libtool because which argument 
     174        # takes precedence is not obvious without immediate 
     175        # explanation.  --with-autotools is really only present to 
     176        # make life a little easier for those who preferred the old 
     177        # behavior where --with-autoconf was used to specify the 
     178        # location of both autoconf and automake. 
    182179        cat <<EOT 
    183 Error: --with-autotools was specified together with either 
    184 --with-autoconf or --with-automake.  --with-autotools is incompatible 
    185 with the other two options.  Please specify only one set or the other. 
     180Error: --with-autotools was specified together with --with-autoconf, 
     181--with-automake or --with-libtool.  --with-autotools is incompatible 
     182with the other options.  Please specify only one set or the other. 
    186183EOT 
    187184        exit 1 
     
    189186        autoconfdir=$autotoolsdir 
    190187        automakedir=$autotoolsdir 
     188        libtooldir=$autotoolsdir 
    191189    fi 
    192190fi 
     
    269267    automake=${AUTOMAKE:-automake} 
    270268    aclocal=${ACLOCAL:-aclocal} 
     269fi 
     270if [ -n "$libtooldir" ] ; then 
     271    if [ -x "$libtooldir/libtoolize" ] ; then 
     272        libtoolize=$libtooldir/libtoolize 
     273        LIBTOOLIZE=$libtoolize 
     274        export LIBTOOLIZE 
     275    else 
     276        echo "could not find executable libtoolize in $libtooldir" 
     277        exit 1 
     278    fi 
     279else 
     280    libtoolize=${LIBTOOLIZE:-libtoolize} 
    271281fi 
    272282 
     
    875885    # must come after the above autoreconf-like logic because the above 
    876886    # logic will delete the results of this actual autoreconf 
     887 
     888    for ltdir in $ltdirs ; do 
     889        if [ -d "$ltdir" -o -L "$ltdir" ] ; then 
     890            echo "running $libtoolize in $ltdir" 
     891            (cd $ltdir && $libtoolize) || exit 1 
     892        fi 
     893    done 
     894 
    877895    for amdir in $amdirs ; do 
    878896        if [ -d "$amdir" -o -L "$amdir" ] ; then