[Bps-public-commit] r10265 - bpsbuilder/BPB/lib/BPB
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jan 8 12:30:08 EST 2008
Author: sunnavy
Date: Tue Jan 8 12:30:08 2008
New Revision: 10265
Modified:
bpsbuilder/BPB/lib/BPB/Backend.pm
Log:
cleaned up build script
Modified: bpsbuilder/BPB/lib/BPB/Backend.pm
==============================================================================
--- bpsbuilder/BPB/lib/BPB/Backend.pm (original)
+++ bpsbuilder/BPB/lib/BPB/Backend.pm Tue Jan 8 12:30:08 2008
@@ -68,7 +68,7 @@
my $build_base = getcwd;
my %args;
-GetOptions( \%args, 'install-base=s', 'perl=s', 'skip-test', 'skip=s' );
+GetOptions( \%args, 'install-base=s', 'perl=s', 'skip=s' );
unless ( $args{'install-base'} ) {
die 'need install-base option';
@@ -127,53 +127,21 @@
. File::Spec->catfile( $args{'install-base'}, 'lib', 'perl5',
$Config{archname} );
- if ( !-f '__build' ) {
- my @commands;
-
- if ( -f 'configure' ) {
- push @commands, './configure --prefix=' . $args{'install-base'},
- 'make', 'make install';
- }
- elsif ( -f 'Build.PL' ) {
- push @commands,
- $args{'perl'}
- . $lib
- . " Build.PL --install_base="
- . $args{'install-base'};
- unless ( $args{'skip-test'} ) {
- push @commands, "./Build test";
- }
- push @commands, "./Build install";
- }
- elsif ( -f 'Makefile.PL' ) {
- push @commands,
- $args{'perl'}
- . $lib
- . " Makefile.PL INSTALL_BASE="
- . $args{'install-base'};
- unless ( $args{'skip-test'} ) {
- push @commands, 'make test';
- }
+ open my $fh, '>>', '../../build.log' or die $!;
- push @commands, "make install";
- }
- else {
- warn "I have no idea how to build this distribution";
- }
- open my $fh, '>', '__build' or die $!;
- print $fh $_, "\n" for @commands;
- close $fh;
+ if ( !-f '__build' ) {
+ warn "I have no idea how to build this distribution";
+ print $fh "build $dir with failure: don't know how to build.\n";
}
else {
substitute('__build');
- }
- chmod 0755, '__build';
- open my $fh, '>>', '../../build.log' or die $!;
- if ( system('./__build') ) {
- print $fh "build $dir with failure $?: $!\n";
- }
- else {
- print $fh "build $dir with success!\n";
+ chmod 0755, '__build';
+ if ( system('./__build') ) {
+ print $fh "build $dir with failure $?: $!\n";
+ }
+ else {
+ print $fh "build $dir with success!\n";
+ }
}
}
More information about the Bps-public-commit
mailing list