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

Comparing COMP/SCRAM/src/BuildSystem/BuildFile.pm (file contents):
Revision 1.3 by williamc, Wed Sep 6 10:17:28 2000 UTC vs.
Revision 1.4 by williamc, Tue Sep 12 13:01:39 2000 UTC

# Line 108 | Line 108 | sub _commontags {
108          return $switch;
109   }
110  
111 + sub GenerateMakefile {
112 +        my $self=shift;
113 +        my $infile=shift;
114 +        my $outfile=shift;
115 +
116 +        $self->{switch}=$self->_initswitcher();
117 +        $self->{switch}->filetoparse($infile);
118 +
119 +        # open a temporary gnumakefile to store output.
120 +        my $fh=FileHandle->new();
121 +        open ( $fh, ">$outfile") or die "Unable to open $outfile for output ".
122 +                                                                "$!\n";
123 +        @{$self->{filehandlestack}}=($fh);
124 +
125 +        #  -- make an alias
126 +        *GNUmakefile=$fh;
127 +        if ( -e $ENV{LatestBuildFile} ) {
128 +          print GNUmakefile "include $ENV{LatestBuildFile}\n";
129 +        }
130 +        $ENV{LatestBuildFile}=$outfile;
131 +        $self->{switch}->parse("makebuild"); # sort out supported tags
132 +        close GNUmakefile;
133 + }
134 +
135   sub ParseBuildFile {
136          my $self=shift;
137          my $base=shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines