[Bps-public-commit] r13139 - in Shipwright: trunk/lib/Shipwright/Script

spang at bestpractical.com spang at bestpractical.com
Tue Jun 10 17:07:48 EDT 2008


Author: spang
Date: Tue Jun 10 17:07:46 2008
New Revision: 13139

Modified:
   Shipwright/   (props changed)
   Shipwright/trunk/lib/Shipwright/Script/Import.pm

Log:
 r41127 at loki:  spang | 2008-06-10 15:36:23 -0400
 be more verbose when auto-generating build scripts. also, create a stubbed-out build file instead of a blank one when we can't figure out how to auto-create it


Modified: Shipwright/trunk/lib/Shipwright/Script/Import.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Script/Import.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Script/Import.pm	Tue Jun 10 17:07:46 2008
@@ -279,6 +279,8 @@
 
     my @commands;
     if ( -f 'configure' ) {
+        print
+          "detected autoconf build system; generating appropriate build script\n";
         @commands = (
             'configure: ./configure --prefix=%%INSTALL_BASE%%',
             'make: make',
@@ -287,6 +289,8 @@
         );
     }
     elsif ( -f 'Build.PL' ) {
+        print "detected Module::Build build system; generating appropriate build\n";
+        print "script";
         push @commands,
           'configure: %%PERL%% Build.PL --install_base=%%INSTALL_BASE%%';
         push @commands, "make: ./Build";
@@ -298,6 +302,8 @@
         push @commands, "clean: %%PERL%% Build realclean";
     }
     elsif ( -f 'Makefile.PL' ) {
+        print "detected ExtUtils::MakeMaker build system; generating appropriate\n";
+        print "build script\n";
         push @commands,
           'configure: %%PERL%% Makefile.PL INSTALL_BASE=%%INSTALL_BASE%%';
         push @commands, 'make: make';
@@ -306,7 +312,21 @@
         push @commands, "clean: make clean";
     }
     else {
+        print "unknown build system for this dist; you MUST manually edit\n";
+        print "script/${shipwright->name}/build or provide a build.pl file\n";
+        print "or this dist will not be built\n";
         $self->log->warn("I have no idea how to build this distribution");
+        # stub build file to provide the user something to go from
+        push @commands,
+          '# Edit this file to specify commands for building this dist.';
+        push @commands,
+          '# See the perldoc for Shipwright::Manual::CustomizeBuild for more';
+        push @commands,
+          '# info.';
+        push @commands, 'make: ';
+        push @commands, 'test: ';
+        push @commands, 'install: ';
+        push @commands, 'clean: ';
     }
 
     open my $fh, '>', File::Spec->catfile( $script_dir, 'build' ) or die $@;



More information about the Bps-public-commit mailing list