svn commit: samba r13940 - in
branches/SAMBA_4_0/source/build/smb_build: .
metze at samba.org
metze at samba.org
Tue Mar 7 14:00:58 GMT 2006
Author: metze
Date: 2006-03-07 14:00:57 +0000 (Tue, 07 Mar 2006)
New Revision: 13940
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13940
Log:
use the local vs. install linkerflag trick for shared libs too
metze
Modified:
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-07 13:47:34 UTC (rev 13939)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-03-07 14:00:57 UTC (rev 13940)
@@ -119,11 +119,12 @@
PICFLAG=$self->{config}->{PICFLAG}
HOSTCC=$self->{config}->{HOSTCC}
-LD=$self->{config}->{LD}
-LDFLAGS=$self->{config}->{LDFLAGS} -L\$(builddir)/bin
LOCAL_LINK_FLAGS=$devld_local
INSTALL_LINK_FLAGS=$devld_install
+LD=$self->{config}->{LD}
+LDFLAGS=$self->{config}->{LDFLAGS} -L\$(builddir)/bin
+
STLD=$self->{config}->{AR}
STLD_FLAGS=-rc -L\$(builddir)/bin
@@ -255,6 +256,14 @@
{
my ($self,$ctx) = @_;
+ my $installdir;
+
+ if ($self->{duplicate_build}) {
+ $installdir = "bin/install";
+ } else {
+ $installdir = "bin";
+ }
+
push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}");
push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}");
@@ -270,19 +279,20 @@
push(@{$self->{proto_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST\)");
}
- $self->output(<< "__EOD__"
+ if ($self->{duplicate_build}) {
+ $self->output(<< "__EOD__"
#
bin/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
\@echo Linking \$\@
- \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \\
+ \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST)
__EOD__
);
- if (defined($ctx->{LIBRARY_SONAME})) {
- $self->output(<< "__EOD__"
+ if (defined($ctx->{LIBRARY_SONAME})) {
+ $self->output(<< "__EOD__"
# Symlink $ctx->{LIBRARY_SONAME}
bin/$ctx->{LIBRARY_SONAME}: bin/$ctx->{LIBRARY_REALNAME}
\@echo Symlink \$\@
@@ -294,7 +304,34 @@
__EOD__
);
+ }
}
+
+ $self->output(<< "__EOD__"
+#
+
+$installdir/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)
+ \@echo Linking \$\@
+ \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
+ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) \\
+ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST)
+
+__EOD__
+);
+ if (defined($ctx->{LIBRARY_SONAME})) {
+ $self->output(<< "__EOD__"
+# Symlink $ctx->{LIBRARY_SONAME}
+$installdir/$ctx->{LIBRARY_SONAME}: $installdir/$ctx->{LIBRARY_REALNAME}
+ \@echo Symlink \$\@
+ \@ln -sf $ctx->{LIBRARY_REALNAME} \$\@
+# Symlink $ctx->{LIBRARY_NAME}
+$installdir/$ctx->{LIBRARY_NAME}: $installdir/$ctx->{LIBRARY_SONAME}
+ \@echo Symlink \$\@
+ \@ln -sf $ctx->{LIBRARY_SONAME} \$\@
+
+__EOD__
+);
+ }
}
sub MergedObj($$)
More information about the samba-cvs
mailing list