[Bps-public-commit] r15760 - in Shipwright/branches/1.10: lib lib/Shipwright/Manual lib/Shipwright/Script share/bin

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Sep 4 12:41:52 EDT 2008


Author: sunnavy
Date: Thu Sep  4 12:41:50 2008
New Revision: 15760

Modified:
   Shipwright/branches/1.10/lib/Shipwright.pm
   Shipwright/branches/1.10/lib/Shipwright/Build.pm
   Shipwright/branches/1.10/lib/Shipwright/Manual/CustomizeBuild.pod
   Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm
   Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm
   Shipwright/branches/1.10/share/bin/shipwright-builder

Log:
merged 15759 to 1.1

Modified: Shipwright/branches/1.10/lib/Shipwright.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright.pm	(original)
+++ Shipwright/branches/1.10/lib/Shipwright.pm	Thu Sep  4 12:41:50 2008
@@ -185,9 +185,9 @@
 =head4 build
 
 configure: %%PERL%% Build.PL --install_base=%%INSTALL_BASE%%
-make: ./Build
-test: ./Build test
-install: ./Build install
+make: %%PERL%% Build
+test: %%PERL%% Build test
+install: %%PERL%% Build install
 clean: %%PERL%% Build realclean
 
 Each line is of `type: command' format, and the command is executed line by

Modified: Shipwright/branches/1.10/lib/Shipwright/Build.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Build.pm	(original)
+++ Shipwright/branches/1.10/lib/Shipwright/Build.pm	Thu Sep  4 12:41:50 2008
@@ -8,7 +8,7 @@
 
 __PACKAGE__->mk_accessors(
     qw/install_base perl build_base skip_test commands log
-      skip only_test force order flags name only/
+      skip only_test force order flags name only make/
 );
 
 use File::Spec::Functions qw/catfile catdir splitdir/;
@@ -40,6 +40,7 @@
 
     $self->name('vessel') unless $self->name;
     $self->skip( {} ) unless $self->skip;
+    $self->make('make') unless $self->make;
 
     unless ( $self->install_base ) {
 
@@ -361,6 +362,7 @@
     $text =~ s/%%PERL%%/$perl/g;
     $text =~ s/%%PERL_ARCHNAME%%/$perl_archname/g;
     $text =~ s/%%INSTALL_BASE%%/$install_base/g;
+    $text =~ s/%%MAKE%%/$self->make/eg;
     return $text;
 }
 

Modified: Shipwright/branches/1.10/lib/Shipwright/Manual/CustomizeBuild.pod
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Manual/CustomizeBuild.pod	(original)
+++ Shipwright/branches/1.10/lib/Shipwright/Manual/CustomizeBuild.pod	Thu Sep  4 12:41:50 2008
@@ -62,10 +62,10 @@
 self-explanatory for anyone familiar with building perl modules.
 
 Three template substitutions are available for use in the command:
-%%PERL%%, %%PERL_ARCHNAME%% and %%INSTALL_BASE%%. These can be used in cases
-where the path to perl, the perl archname (e.g.
-'i486-linux-gnu-thread-multi'), or the base install path are needed, since they
-are not known beforehand.
+%%PERL%%, %%PERL_ARCHNAME%%, %%INSTALL_BASE%% and %%MAKE%%.
+These can be used in cases where the path to perl, the perl archname (e.g.
+'i486-linux-gnu-thread-multi'), the base install path or make command 
+are needed, since they are not known beforehand or need to choose one later.
 
 There are two special types: C<test> and C<clean>.
 

Modified: Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm	(original)
+++ Shipwright/branches/1.10/lib/Shipwright/Script/Build.pm	Thu Sep  4 12:41:50 2008
@@ -7,7 +7,7 @@
 use base qw/App::CLI::Command Class::Accessor::Fast Shipwright::Script/;
 __PACKAGE__->mk_accessors(
     qw/build_base skip skip_test only_test install_base
-      force log_file flags name perl only with/
+      force log_file flags name perl only with make/
 );
 
 use Shipwright;
@@ -27,6 +27,7 @@
         'force'          => 'force',
         'perl'           => 'perl',
         'with=s'         => 'with',
+        'make=s'         => 'make',
     );
 }
 
@@ -80,7 +81,7 @@
     my $shipwright = Shipwright->new(
         map { $_ => $self->$_ }
           qw/repository log_level log_file skip skip_test
-          flags name force only_test install_base build_base perl only/
+          flags name force only_test install_base build_base perl only make/
     );
 
     $shipwright->backend->export( target => $shipwright->build->build_base );
@@ -123,6 +124,7 @@
  --name NAME                  : specify the name of the project
  --perl PATH                  : specify the path of perl that run the commands
                                 in scripts/
+ --make PATH                  : specify the path of make command
  --with name=source,...       : don't build the dist of the name in repo,
                                 use the one specified here instead.
 

Modified: Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/branches/1.10/lib/Shipwright/Script/Import.pm	Thu Sep  4 12:41:50 2008
@@ -308,10 +308,10 @@
 "detected ExtUtils::MakeMaker build system; generating appropriate build script\n";
         @commands = (
             'configure: %%PERL%% Makefile.PL INSTALL_BASE=%%INSTALL_BASE%%',
-            'make: make',
-            'test: make test',
-            'install: make install',
-            'clean: make clean',
+            'make: %%MAKE%%',
+            'test: %%MAKE%% test',
+            'install: %%MAKE%% install',
+            'clean: %%MAKE%% clean',
         );
     }
     elsif ( -f catfile( $source_dir, 'configure' ) ) {
@@ -319,9 +319,9 @@
 "detected autoconf build system; generating appropriate build script\n";
         @commands = (
             'configure: ./configure --prefix=%%INSTALL_BASE%%',
-            'make: make',
-            'install: make install',
-            'clean: make clean',
+            'make: %%MAKE%%',
+            'install: %%MAKE%% install',
+            'clean: %%MAKE%% clean',
         );
     }
     else {

Modified: Shipwright/branches/1.10/share/bin/shipwright-builder
==============================================================================
--- Shipwright/branches/1.10/share/bin/shipwright-builder	(original)
+++ Shipwright/branches/1.10/share/bin/shipwright-builder	Thu Sep  4 12:41:50 2008
@@ -27,6 +27,7 @@
     'name=s',                 'help',
     'noclean',                'only=s',
     'with=s',                 'noclean-after-install',
+    'make=s',
   );
 
 my $USAGE = <<'END'
@@ -76,6 +77,9 @@
     e.g. --with svn=dir:/home/foo/svn
     'svn' is the dist name, 'dir:/home/foo/svn' is its source, with the format of Shipwright::Source
 
+make: specify the path of your make command, default is 'make'.
+    e.g. --make /usr/bin/make
+
 END
   ;
 
@@ -91,6 +95,7 @@
 };
 
 $args{with} = { map { split /=/ } split /\s*,\s*/, $args{with} || '' };
+$args{make} ||= 'make';
 
 if ( $args{only} ) {
     $args{only} = { map { $_ => 1 } split /\s*,\s*/, $args{only} };
@@ -455,6 +460,8 @@
     my $perl_archname = `$perl -MConfig -e 'print \$Config{archname}'`;
     $text =~ s/%%PERL%%/$perl/g;
     $text =~ s/%%PERL_ARCHNAME%%/$perl_archname/g;
+    $text =~ s/%%PERL_ARCHNAME%%/$perl_archname/g;
+    $text =~ s/%%MAKE%%/$args{make}/g;
 
     return $text;
 }



More information about the Bps-public-commit mailing list