diff options
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r-- | source4/build/smb_build/output.pm | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index ff9afe8e8c..eec438b108 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -9,38 +9,6 @@ package output; use strict; use smb_build::config; -sub add_dir_str($$) -{ - my ($dir,$file) = @_; - my $dirsep = "/"; - - $dir =~ s/^\.$//g; - $dir =~ s/^\.\///g; - - $dirsep = "" if ($dir eq ""); - - my $ret = $file; - if (substr($ret, 0, 1) ne "\$") { - $ret = "$dir$dirsep$file"; - $ret =~ s/([^\/\.]+)\/\.\.\///g; - $ret =~ s/([^\/\.]+)\/\.\.\///g; - } - - return $ret; -} - -sub add_dir_array($$) -{ - my ($dir,$files) = @_; - my @ret = (); - - foreach (@{$files}) { - push (@ret, add_dir_str($dir, $_)); - } - - return @ret; -} - sub generate_shared_library($) { my $lib = shift; @@ -168,8 +136,15 @@ sub create_output($$) next unless(defined($part->{OUTPUT_TYPE})); # Combine object lists - my @list = add_dir_array($part->{BASEDIR}, $part->{OBJ_FILES}); - push(@{$part->{OBJ_LIST}}, @list) if defined($part->{OBJ_FILES}); + if (defined($part->{OBJ_FILES})) { + my $list; + + $list = join(" ", @{$part->{OBJ_FILES}}); + unless ($list =~ /^\.\//) { + $list = "\$(addprefix $part->{BASEDIR}/, $list)" + } + push(@{$part->{OBJ_LIST}}, $list); + } generate_binary($part) if grep(/BINARY/, @{$part->{OUTPUT_TYPE}}); generate_shared_library($part) if grep(/SHARED_LIBRARY/, @{$part->{OUTPUT_TYPE}}); |