From b6e3c0cf0df9294b2c2ac5f97cfd11500c7e713d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 15 Jan 2007 10:49:02 +0000 Subject: r20802: - don't add the same Makefile vars twice... - this fixes a lot of warnings on Tru64 maybe this also fixes the build on Tru64 and HPUX... metze (This used to be commit a154fd04c84323d2e9e537e78fd95e29428cfd8a) --- source4/build/smb_build/makefile.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index e3853e8534..48379b279d 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -215,6 +215,7 @@ sub SharedLibrary($$) my ($self,$ctx) = @_; my $init_obj = ""; + my $has_static_lib = 0; if ($ctx->{TYPE} eq "LIBRARY") { push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); @@ -237,9 +238,13 @@ sub SharedLibrary($$) } } - $self->output("$ctx->{TYPE}_$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); - $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); + $has_static_lib = 1 if grep(/STATIC_LIBRARY/, @{$ctx->{OUTPUT_TYPE}}); + + if (not $has_static_lib) { + $self->output("$ctx->{TYPE}_$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); + $self->_prepare_list($ctx, "OBJ_LIST"); + $self->_prepare_list($ctx, "FULL_OBJ_LIST"); + } $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); -- cgit