diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-15 22:08:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-15 22:08:49 +0200 |
commit | 038987543043346cdcd8a4b8fe2970cd1350a7a7 (patch) | |
tree | 63df88d6cc354bd766a4b9b3f36d3e43bf67872b /source4/build/smb_build/output.pm | |
parent | f01c377bc039b776ded213f455cdb79d682ae7b2 (diff) | |
parent | b708a3d1e7f8d98bc6cedad8d405b1434d32a22e (diff) | |
download | samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.tar.gz samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.tar.bz2 samba-038987543043346cdcd8a4b8fe2970cd1350a7a7.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into registry
(This used to be commit 70ebb22c3df178a26c26c0a25c5722ff9ccdb0b4)
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r-- | source4/build/smb_build/output.pm | 61 |
1 files changed, 9 insertions, 52 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 4ae4a62cf4..aeff7d48ce 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -7,39 +7,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($) { @@ -80,10 +47,8 @@ sub generate_shared_library($) $lib->{LIBRARY_DEBUGNAME} = $lib->{LIBRARY_REALNAME}; - if (defined($lib->{VERSION}) and $config::config{SONAMEFLAG} ne "#") { - $lib->{LIBRARY_SONAME} = "$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_SOVERSION)"; - $lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_VERSION)"; - } + $lib->{LIBRARY_SONAME} = "\$(if \$($lib->{NAME}_SOVERSION),$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_SOVERSION),$lib->{LIBRARY_REALNAME})"; + $lib->{LIBRARY_REALNAME} = "\$(if \$($lib->{NAME}_VERSION),$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_VERSION),$lib->{LIBRARY_REALNAME})"; $lib->{RESULT_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}"; $lib->{OUTPUT_SHARED_LIBRARY} = "-l$link_name"; @@ -97,11 +62,9 @@ sub generate_merged_obj($) my $link_name = $lib->{NAME}; $link_name =~ s/^LIB//; - if (defined($lib->{OBJ_FILES})) { - $lib->{MERGED_OBJNAME} = lc($link_name).".o"; - $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; - $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; - } + $lib->{MERGED_OBJNAME} = lc($link_name).".o"; + $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}"; + $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ}; } sub generate_static_library($) @@ -116,12 +79,10 @@ sub generate_static_library($) $lib->{LIBRARY_NAME} = "lib".lc($link_name).".a"; - if (defined($lib->{OBJ_FILES})) { - $lib->{RESULT_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; - $lib->{TARGET_STATIC_LIBRARY} = $lib->{RESULT_STATIC_LIBRARY}; - $lib->{STATICDIR} = 'bin/static'; - $lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name); - } + $lib->{RESULT_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}"; + $lib->{TARGET_STATIC_LIBRARY} = $lib->{RESULT_STATIC_LIBRARY}; + $lib->{STATICDIR} = 'bin/static'; + $lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name); } sub generate_binary($) @@ -160,10 +121,6 @@ sub create_output($$) foreach $part (values %{$depend}) { 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}); - generate_binary($part) if grep(/BINARY/, @{$part->{OUTPUT_TYPE}}); generate_shared_library($part) if grep(/SHARED_LIBRARY/, @{$part->{OUTPUT_TYPE}}); generate_static_library($part) if grep(/STATIC_LIBRARY/, @{$part->{OUTPUT_TYPE}}); |