ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/Build.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/Build.pm (file contents):
Revision 1.1 by williamc, Tue Sep 12 13:01:02 2000 UTC vs.
Revision 1.3 by williamc, Fri Sep 15 11:18:21 2000 UTC

# Line 20 | Line 20 | require 5.004;
20   sub new {
21          my $class=shift;
22          my $self={};
23        $self->{area}=shift;
23          bless $self, $class;
24 +        $self->{area}=shift;
25 +        $self->{area}->copyenv(\%ENV);
26 +        $ENV{LOCALTOP}=$self->{area}->location();
27 +        $self->verbose("LOCALTOP=".$ENV{LOCALTOP});
28          return $self;
29   }
30  
# Line 31 | Line 34 | sub build {
34  
35          # -- set up a report
36          my $report=BuildSystem::BuildReport->new();
34        $report->pass(0); # set to fail
37  
38          # -- interface with old system
39          my $fulldir=$self->{area}->location()."/".$dir;
40          if ( ! -d $fulldir ) {
41            $report->error("$fulldir does not exist");
42 +          $report->status(1); # set to fail
43          }
44          else {
45            chdir $fulldir;
46 <          my $bs=BuildSystem::BuildSetup->new($self->{area});
47 <          $rv=$bs->BuildSetup($dir,@_);
48 <          $report->pass($rv);
46 >          # -- initialise BuildSystem if we dont already have it
47 >          if ( ! defined $self->{bs} ) {
48 >            $self->{bs}=BuildSystem::BuildSetup->new($self->{area});
49 >            $self->{bs}->verbosity(1);
50 >          }
51 >          $self->verbose("Calling build module with $dir, @_");
52 >          my $rv=$self->{bs}->BuildDir($dir,@_);
53 >          $report->status($rv);
54          }
55          return $report;
56   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines