diff options
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r-- | source4/build/smb_build/output.pm | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index f6c4a78274..46e8ffb0c5 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -10,6 +10,21 @@ package output; use strict; +sub add_dir($$) +{ + my ($dir,$files) = @_; + my @ret = (); + + foreach (@$files) { + $_ = "$dir/$_"; + s/\/\//\//g; + s/\/([^\/\.]+)\/\.\.\//\//g; + push (@ret, $_); + } + + return @ret; +} + sub generate_mergedobj($) { my $subsys = shift; @@ -93,9 +108,9 @@ sub create_output($) next if not defined($part->{OUTPUT_TYPE}); # Combine object lists - push(@{$part->{OBJ_LIST}}, @{$part->{INIT_OBJ_FILES}}) if defined($part->{INIT_OBJ_FILES}); - push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES}); - push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES}); + push(@{$part->{OBJ_LIST}}, add_dir($part->{BASEDIR}, $part->{INIT_OBJ_FILES})) if defined($part->{INIT_OBJ_FILES}); + push(@{$part->{OBJ_LIST}}, add_dir($part->{BASEDIR}, $part->{ADD_OBJ_FILES})) if defined($part->{ADD_OBJ_FILES}); + push(@{$part->{OBJ_LIST}}, add_dir($part->{BASEDIR}, $part->{OBJ_FILES})) if defined($part->{OBJ_FILES}); if ((not defined($part->{OBJ_LIST}) or scalar(@{$part->{OBJ_LIST}}) == 0) and |