From 7071276c65e0335386441bd2b81afeac73283808 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 16 Feb 2008 20:24:47 +0100 Subject: Simpler handling of sonameflag. (This used to be commit 1e786bb7da689c3aa435e92975f33db5a308b6a7) --- source4/build/smb_build/makefile.pm | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'source4/build/smb_build/makefile.pm') diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 26f986eacf..52bd5ed610 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -225,31 +225,22 @@ sub SharedLibrary($$) $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); - my $soarg = ""; - my $lns = ""; - if ($self->{config}->{SONAMEFLAG} ne "#" and defined($ctx->{LIBRARY_SONAME})) { - $soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME}"; - if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { - $lns .= "\n\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}"; - } - } - - $lns .= "\nifdef $ctx->{NAME}_SOVERSION"; - $lns .= "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}"; - $lns .= "\nendif"; - $self->output(<< "__EOD__" -# $ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p \$(\@D) \@\$(SHLD) \$(LDFLAGS) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ \$($ctx->{NAME}\_FULL_OBJ_LIST) \\ \$($ctx->{NAME}_LINK_FLAGS) \\ - $soarg$lns + \$(if \$(SONAMEFLAG), \$(SONAMEFLAG)$ctx->{LIBRARY_SONAME}) __EOD__ ); - $self->output("\n"); + if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { + $self->output("\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}\n"); + } + $self->output("ifdef $ctx->{NAME}_SOVERSION\n"); + $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}\n"); + $self->output("endif\n"); } sub MergedObj($$) -- cgit