Ignore:
Timestamp:
2013-05-24T15:33:26+12:00 (11 years ago)
Author:
jmt12
Message:

Moved opt_modulebuild_* functions into a library, and altered the cascade file for Module::Build to use them instead as otherwise I can't seem to get the extension's perl path on the INC

Location:
gs2-extensions/parallel-building/trunk/src/packages/CASCADE-MAKE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/parallel-building/trunk/src/packages/CASCADE-MAKE/DATETIME.sh

    r27440 r27450  
    77
    88source ../cascade-make/lib/cascade-lib.bash GEXTPARALLELBUILDING ../.. $*
    9 
    10 # One day these functions should live in their own library
    11 opt_modulebuild_configure()
    12 {
    13   local force_config=$1; shift
    14   local auto_config=$1; shift
    15   local package=$1; shift
    16   local version=$1; shift
    17   local prefix=$1; shift
    18   local perlversion=$1; shift
    19 
    20   local buildfile_path="$package$version/Build"
    21   if [ -e $buildfile_path ] ; then
    22     force_config=0
    23   fi
    24 
    25   if [ $force_config = "1" ] ; then
    26     echo "[pushd $package$version]"
    27     ( cd $package$version ; \
    28       perl -I "$prefix/lib/perl/$perlversion" Build.PL --install_base "$prefix" --install_path lib="$prefix/lib/perl/$perlversion" --install_path arch="$prefix/lib/perl/$perlversion" $@)
    29     if [ $? != 0 ] ; then
    30         echo "      Error encountered running *configure* stage of $progname"
    31         exit 1
    32     fi
    33     echo "[popd]"
    34   else
    35     if [ $auto_config = "1" ] ; then
    36       echo "Found top-level for ${progname%.*} => no need to run perl configure"
    37     fi
    38   fi
    39 }
    40 
    41 
    42 opt_modulebuild_make()
    43 {
    44   local type=$1; shift
    45   local package=$1; shift
    46   local version=$1; shift
    47   local opt_target=""
    48 
    49   if [ ! -z "$1" ] ; then
    50     opt_target=$1; shift
    51   fi
    52 
    53   if [ $type = "1" ] ; then
    54     ( cd $package$version ; \
    55       ./Build $opt_target $@)
    56 
    57     if [ $? != 0 ] ; then
    58         echo "      Error encountered running *Build $target* stage of $progname"
    59         exit 1
    60     fi
    61   fi
    62 }
     9source ../cascade-make/lib/cascade-lib-modulebuild.bash GEXTPARALLELBUILDING $*
    6310
    6411prefix=$GEXTPARALLELBUILDING_INSTALLED
  • gs2-extensions/parallel-building/trunk/src/packages/CASCADE-MAKE/MODULEBUILD.sh

    r27445 r27450  
    77
    88source ../cascade-make/lib/cascade-lib.bash GEXTPARALLELBUILDING ../.. $*
     9source ../cascade-make/lib/cascade-lib-modulebuild.bash GEXTPARALLELBUILDING $*
    910
    1011prefix=$GEXTPARALLELBUILDING_INSTALLED
     
    1213
    1314opt_run_untar $force_untar $auto_untar $package $version
    14 opt_run_perl_configure $force_config $auto_config $package $version $prefix INSTALLSITEARCH="$prefix/lib/perl/$perlversion" INSTALLSITELIB="$prefix/lib/perl/$perlversion"
     15opt_modulebuild_configure $force_config $auto_config $package $version $prefix INSTALLSITEARCH="$prefix/lib/perl/$perlversion" INSTALLSITELIB="$prefix/lib/perl/$perlversion"
    1516
    1617# We only compile if necessary, as compilation is quite slow and we don't
     
    1819if [[ ! -e "$prefix/lib/perl/$perlversion/Module/Build.pm" ]]
    1920then
    20   opt_run_make $compile   $package $version
     21  opt_modulebuild_make $compile   $package $version
    2122  echo "opt_run_make $install $package $version \"install\""
    22   opt_run_make $install   $package $version "install"
     23  opt_modulebuild_make $install   $package $version "install"
    2324else
    2425  echo "Module::Build Perl module already compiled => no need to recompile"
    2526fi
    2627
    27 opt_run_make $clean     $package $version "clean"
    28 opt_run_make $distclean $package $version "distclean"
     28opt_modulebuild_make $clean     $package $version "clean"
     29opt_modulebuild_make $distclean $package $version "distclean"
    2930
    3031opt_run_tarclean $tarclean $package $version
Note: See TracChangeset for help on using the changeset viewer.