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.30 by sashby, Tue Feb 27 11:59:44 2007 UTC vs.
Revision 1.32 by muzaffar, Fri Dec 14 09:03:46 2007 UTC

# Line 43 | Line 43 | sub parse()
43     {
44     my $self=shift;
45     my ($filename)=@_;
46 +   my $fhead='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><doc type="BuildSystem::BuildFile" version="1.0">';
47 +   my $ftail='</doc>';
48     $self->{scramdoc}->filetoparse($filename);
49 <   $self->{scramdoc}->parse("builder");
49 >   $self->{scramdoc}->parse("builder",$fhead,$ftail);
50     # We're done with the SimpleDoc object so delete it:
51     delete $self->{scramdoc};
52     }
# Line 221 | Line 223 | sub makefile()
223   sub makefile_content()
224     {
225     my ($object, @strings) = @_;
226 <   push(@{$self->{makefilecontent}},@strings);
226 >   foreach my $str (@strings)
227 >      {
228 >      push(@{$self->{makefilecontent}},$str);
229 >      }
230     }
231  
232   sub makefile_()
233     {
234     my ($object,$name)=@_;
235 <   $self->{nested} == 1 ? push(@{$self->{tagcontent}->{MAKEFILE}}, join('',@{$self->{makefilecontent}}))
236 <      : push(@{$self->{content}->{MAKEFILE}}, join('',@{$self->{makefilecontent}}));
235 >   $self->{nested} == 1 ? push(@{$self->{tagcontent}->{MAKEFILE}}, join("\n",@{$self->{makefilecontent}}))
236 >      : push(@{$self->{content}->{MAKEFILE}}, join("\n",@{$self->{makefilecontent}}));
237     delete $self->{makefilecontent};
238     # Unset the Char handler to revert to the default behaviour:
239     $object->setHandlers(Char => 0);
# Line 278 | Line 283 | sub flags()
283     my ($flagname,$flagvaluestring) = each %attributes;
284     $flagname =~ tr/[a-z]/[A-Z]/; # Keep flag name uppercase
285     chomp($flagvaluestring);
286 <   # Split the value on whitespace so we can push all
282 <   # individual flags into an array:
283 <   my @flagvalues = split(' ',$flagvaluestring);
286 >   my @flagvalues = ( $flagvaluestring );
287     # Is current tag within another tag block?
288     if ($self->{nested} == 1)
289        {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines