[Bps-public-commit] Shipwright branch, master, updated. 9826f75ddc731fc7ffd224fde979eab10aa35c13

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jul 30 22:08:18 EDT 2009


The branch, master has been updated
       via  9826f75ddc731fc7ffd224fde979eab10aa35c13 (commit)
      from  c5da759633458cc41f977f12208b1940bcfb9018 (commit)

Summary of changes:
 bin/shipwright                |    1 +
 lib/Shipwright/Source/Base.pm |    2 +-
 share/bin/shipwright-builder  |    3 ++-
 t/71.script_cmds.t            |    1 -
 t/hello/fs.t                  |    3 +--
 5 files changed, 5 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 9826f75ddc731fc7ffd224fde979eab10aa35c13
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jul 31 09:59:02 2009 +0800

    add env SHIPWRIGHT_MAKE to find which make shipwright should use

diff --git a/bin/shipwright b/bin/shipwright
index 626ea5e..755e502 100755
--- a/bin/shipwright
+++ b/bin/shipwright
@@ -9,6 +9,7 @@ use Cwd;
 local $SIG{INT} = sub { warn "Stopped\n"; exit; };
 
 my $cwd = getcwd;
+$ENV{SHIPWRIGHT_MAKE} ||= 'make';
 $ENV{SHIPWRIGHT_SVK} ||= 'svk';
 $ENV{SHIPWRIGHT_SVN} ||= 'svn';
 $ENV{SHIPWRIGHT_GIT} ||= 'git';
diff --git a/lib/Shipwright/Source/Base.pm b/lib/Shipwright/Source/Base.pm
index d8e2d6b..433b85e 100644
--- a/lib/Shipwright/Source/Base.pm
+++ b/lib/Shipwright/Source/Base.pm
@@ -366,7 +366,7 @@ EOF
 
             }
             Shipwright::Util->run(
-                [ ( $^O =~ /MSWin/ ? 'dmake' : 'make' ), 'clean' ] );
+                [ $ENV{SHIPWRIGHT_MAKE}, 'clean' ] );
             unlink 'Makefile.old';
         }
 
diff --git a/share/bin/shipwright-builder b/share/bin/shipwright-builder
index f5b4b5f..7d37673 100755
--- a/share/bin/shipwright-builder
+++ b/share/bin/shipwright-builder
@@ -92,7 +92,7 @@ Less commonly needed options:
                 Ex: --with svn=dir:/home/foo/svn
                 'svn' is the dist name, 'dir:/home/foo/svn' is its source code,
                 in the format of a Shipwright source distribution.
-  --make        The path of your make command, default is 'make'.
+  --make        The path of your make command, default is \$ENV{SHIPWRIGHT_MAKE}' if that's defined, else 'make'
                 Ex: --make /usr/bin/make
   --branches    Specify the branch of a given package in the vessel you want 
                 to build.
@@ -126,6 +126,7 @@ $args{flags} = {
 $args{with}     = { map { split /=/ } split /\s*,\s*/, $args{with}     || '' };
 $args{branches} = { map { split /=/ } split /\s*,\s*/, $args{branches} || '' };
 
+$args{make} ||= $ENV{SHIPWRIGHT_MAKE};
 unless ( $args{make} ) {
     if ( is_on_windows() ) {
         $args{make} ||= 'dmake'; # strawberry perl distribution has dmake.exe
diff --git a/t/71.script_cmds.t b/t/71.script_cmds.t
index 8a8ce16..f35eebc 100644
--- a/t/71.script_cmds.t
+++ b/t/71.script_cmds.t
@@ -338,7 +338,6 @@ qr/set mandatory flags with success\s+mandatory flags of man1 are build/,
                     [
                         $^X, 'bin/shipwright-builder',
                         @{ $item->[0] },
-                        $^O =~ /MSWin/ ? ( '--make', 'dmake' ) : ()
                     ],
                     @$item[ 1 .. $#$item ],
                 );
diff --git a/t/hello/fs.t b/t/hello/fs.t
index a58a838..abafee1 100644
--- a/t/hello/fs.t
+++ b/t/hello/fs.t
@@ -173,8 +173,7 @@ for (
 }
 
 chdir( $build_base );
-system( "$^X bin/shipwright-builder --install-base $install_base"
-      . ( $^O =~ /MSWin/ ? ' --make dmake' : '' ) );
+system( "$^X bin/shipwright-builder --install-base $install_base" );
 for (
     catfile(
         $install_base, 'lib',

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list