Last change
on this file since 27449 was 27449, checked in by jmt12, 11 years ago |
opt_run_* like functions but customized for the alternate Perl module maker Module::Build
|
File size:
1.3 KB
|
Rev | Line | |
---|
[27449] | 1 | opt_modulebuild_configure()
|
---|
| 2 | {
|
---|
| 3 | local force_config=$1; shift
|
---|
| 4 | local auto_config=$1; shift
|
---|
| 5 | local package=$1; shift
|
---|
| 6 | local version=$1; shift
|
---|
| 7 | local prefix=$1; shift
|
---|
| 8 | local perlversion=$1; shift
|
---|
| 9 |
|
---|
| 10 | local buildfile_path="$package$version/Build"
|
---|
| 11 | if [ -e $buildfile_path ] ; then
|
---|
| 12 | force_config=0
|
---|
| 13 | fi
|
---|
| 14 |
|
---|
| 15 | if [ $force_config = "1" ] ; then
|
---|
| 16 | echo "[pushd $package$version]"
|
---|
| 17 | ( cd $package$version ; \
|
---|
| 18 | 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" $@)
|
---|
| 19 | if [ $? != 0 ] ; then
|
---|
| 20 | echo " Error encountered running *configure* stage of $progname"
|
---|
| 21 | exit 1
|
---|
| 22 | fi
|
---|
| 23 | echo "[popd]"
|
---|
| 24 | else
|
---|
| 25 | if [ $auto_config = "1" ] ; then
|
---|
| 26 | echo "Found top-level for ${progname%.*} => no need to run perl configure"
|
---|
| 27 | fi
|
---|
| 28 | fi
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 |
|
---|
| 32 | opt_modulebuild_make()
|
---|
| 33 | {
|
---|
| 34 | local type=$1; shift
|
---|
| 35 | local package=$1; shift
|
---|
| 36 | local version=$1; shift
|
---|
| 37 | local opt_target=""
|
---|
| 38 |
|
---|
| 39 | if [ ! -z "$1" ] ; then
|
---|
| 40 | opt_target=$1; shift
|
---|
| 41 | fi
|
---|
| 42 |
|
---|
| 43 | if [ $type = "1" ] ; then
|
---|
| 44 | ( cd $package$version ; \
|
---|
| 45 | ./Build $opt_target $@)
|
---|
| 46 |
|
---|
| 47 | if [ $? != 0 ] ; then
|
---|
| 48 | echo " Error encountered running *Build $target* stage of $progname"
|
---|
| 49 | exit 1
|
---|
| 50 | fi
|
---|
| 51 | fi
|
---|
| 52 | }
|
---|
| 53 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.