ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/Build.pm
Revision: 1.1
Committed: Tue Sep 12 13:01:02 2000 UTC (24 years, 7 months ago) by williamc
Content type: text/plain
Branch: MAIN
Log Message:
First draft

File Contents

# User Rev Content
1 williamc 1.1 #
2     # Build.pm
3     #
4     # Originally Written by Christopher Williams
5     #
6     # Description
7     #
8     # Interface
9     # ---------
10     # new(ConfigArea) : A new Build object
11     # build(dir,[@targets]) : Build relevant target for a given directory
12     # dir relative to top. Returns a BuildReport
13    
14     package BuildSystem::Build;
15     use BuildSystem::BuildReport;
16     use Utilities::Verbose;
17     require 5.004;
18     @ISA=qw(Utilities::Verbose);
19    
20     sub new {
21     my $class=shift;
22     my $self={};
23     $self->{area}=shift;
24     bless $self, $class;
25     return $self;
26     }
27    
28     sub build {
29     my $self=shift;
30     my $dir=shift;
31    
32     # -- set up a report
33     my $report=BuildSystem::BuildReport->new();
34     $report->pass(0); # set to fail
35    
36     # -- interface with old system
37     my $fulldir=$self->{area}->location()."/".$dir;
38     if ( ! -d $fulldir ) {
39     $report->error("$fulldir does not exist");
40     }
41     else {
42     chdir $fulldir;
43     my $bs=BuildSystem::BuildSetup->new($self->{area});
44     $rv=$bs->BuildSetup($dir,@_);
45     $report->pass($rv);
46     }
47     return $report;
48     }