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 |
|
} |
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); |
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 |
|
{ |