svn commit: samba r19574 - in branches/SAMBA_4_0/source: .
bin/shared build/smb_build param
jelmer at samba.org
jelmer at samba.org
Mon Nov 6 16:57:01 GMT 2006
Author: jelmer
Date: 2006-11-06 16:57:00 +0000 (Mon, 06 Nov 2006)
New Revision: 19574
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19574
Log:
Initial work towards supporting build of both shared and static libraries.
Modified:
branches/SAMBA_4_0/source/bin/shared/
branches/SAMBA_4_0/source/build/smb_build/makefile.pm
branches/SAMBA_4_0/source/build/smb_build/output.pm
branches/SAMBA_4_0/source/main.mk
branches/SAMBA_4_0/source/param/
Changeset:
Property changes on: branches/SAMBA_4_0/source/bin/shared
___________________________________________________________________
Name: svn:ignore
+ *.so.*
*.so
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-11-06 16:11:52 UTC (rev 19573)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm 2006-11-06 16:57:00 UTC (rev 19574)
@@ -108,9 +108,13 @@
my $devld_install = "";
my $builddir_headers = "";
+ my $libdir;
- if ($self->{config}->{LIBRARY_OUTPUT_TYPE} eq "SHARED_LIBRARY") {
- $devld_install = " -Wl,-rpath-link,\$(builddir)/bin";
+ if ($self->{config}->{USESHARED} eq "true") {
+ $libdir = "\$(builddir)/bin/shared";
+ $devld_install = " -Wl,-rpath-link,\$(builddir)/bin/shared";
+ } else {
+ $libdir = "\$(builddir)/bin";
}
if (!(abs_path($self->{config}->{srcdir}) eq abs_path($self->{config}->{builddir}))) {
@@ -133,13 +137,13 @@
INSTALL_LINK_FLAGS=$devld_install
LD=$self->{config}->{LD}
-LDFLAGS=$self->{config}->{LDFLAGS} -L\$(builddir)/bin
+LDFLAGS=$self->{config}->{LDFLAGS} -L$libdir
STLD=$self->{config}->{STLD}
STLD_FLAGS=$self->{config}->{STLD_FLAGS}
SHLD=$self->{config}->{SHLD}
-SHLD_FLAGS=$self->{config}->{SHLD_FLAGS} -L\$(builddir)/bin
+SHLD_FLAGS=$self->{config}->{SHLD_FLAGS} -L$libdir
SHLIBEXT=$self->{config}->{SHLIBEXT}
XSLTPROC=$self->{config}->{XSLTPROC}
@@ -210,15 +214,15 @@
my $init_obj = "";
if ($ctx->{TYPE} eq "LIBRARY") {
- push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
- push (@{$self->{installable_shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
+ push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
+ push (@{$self->{installable_shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
} elsif ($ctx->{TYPE} eq "MODULE") {
push (@{$self->{shared_modules}}, "$ctx->{TARGET}");
- push (@{$self->{plugins}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}");
+ push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}");
- $self->{install_plugins} .= "\t\@echo Installing $ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{install_plugins} .= "\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
$self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/\n";
- $self->{install_plugins} .= "\t\@cp $ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
+ $self->{install_plugins} .= "\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
$self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
$self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{LIBRARY_REALNAME}\n";
if (defined($ctx->{ALIASES})) {
@@ -244,14 +248,14 @@
$proto_fn =~ s/\(\*\)/$ctx->{INIT_FUNCTION}/;
$self->output(<< "__EOD__"
-bin/$ctx->{NAME}_init_module.c:
+$ctx->{SHAREDDIR}/$ctx->{NAME}_init_module.c:
\@echo Creating \$\@
\@echo \"#include \\\"includes.h\\\"\" > \$\@
\@echo \"$proto_fn;\" >> \$\@
\@echo -e \"_PUBLIC_ $init_fn \\n{\\n\\treturn $ctx->{INIT_FUNCTION}();\\n}\\n\" >> \$\@
__EOD__
);
- $init_obj = "bin/$ctx->{NAME}_init_module.o";
+ $init_obj = "$ctx->{SHAREDDIR}/$ctx->{NAME}_init_module.o";
}
my $soarg = "";
@@ -260,7 +264,7 @@
defined($ctx->{LIBRARY_SONAME})) {
$soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME} ";
if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) {
- $soargdebug = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$ctx->{LIBRARY_SONAME}";
+ $soargdebug = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}";
}
}
@@ -269,15 +273,15 @@
if ($self->{config}->{SONAMEFLAG} ne "" and
defined($ctx->{LIBRARY_SONAME}) and
$ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) {
- $singlesoarg = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$ctx->{LIBRARY_SONAME}";
+ $singlesoarg = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}";
}
$self->output(<< "__EOD__"
#
-$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj
+$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $init_obj
\@echo Linking \$\@
- \@mkdir -p $ctx->{DEBUGDIR}
+ \@mkdir -p $ctx->{SHAREDDIR}
\@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
\$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\
$init_obj $singlesoarg
@@ -286,7 +290,7 @@
if (defined($ctx->{ALIASES})) {
foreach (@{$ctx->{ALIASES}}) {
- $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$_.\$(SHLIBEXT)\n");
+ $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$_.\$(SHLIBEXT)\n");
}
}
$self->output("\n");
Modified: branches/SAMBA_4_0/source/build/smb_build/output.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-11-06 16:11:52 UTC (rev 19573)
+++ branches/SAMBA_4_0/source/build/smb_build/output.pm 2006-11-06 16:57:00 UTC (rev 19574)
@@ -53,17 +53,15 @@
if (defined($lib->{LIBRARY_REALNAME})) {
$lib->{BASEDIR} =~ s/^\.\///g;
$lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}";
- $lib->{DEBUGDIR} = $lib->{RELEASEDIR} = $lib->{BASEDIR};
+ $lib->{SHAREDDIR} = $lib->{BASEDIR};
} else {
if ($lib->{TYPE} eq "MODULE") {
- $lib->{DEBUGDIR} = "bin/modules/$lib->{SUBSYSTEM}";
- $lib->{RELEASEDIR} = "bin/install/modules/$lib->{SUBSYSTEM}";
+ $lib->{SHAREDDIR} = "bin/modules/$lib->{SUBSYSTEM}";
$lib->{LIBRARY_REALNAME} = $link_name;
$lib->{LIBRARY_REALNAME} =~ s/^$lib->{SUBSYSTEM}_//g;
$lib->{LIBRARY_REALNAME}.= ".\$(SHLIBEXT)";
} else {
- $lib->{DEBUGDIR} = "bin";
- $lib->{RELEASEDIR} = "bin/install";
+ $lib->{SHAREDDIR} = "bin/shared";
$lib->{LIBRARY_REALNAME} = "$lib_name.\$(SHLIBEXT)";
}
}
@@ -73,7 +71,7 @@
$lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}.$lib->{VERSION}";
}
- $lib->{TARGET} = "$lib->{DEBUGDIR}/$lib->{LIBRARY_REALNAME}";
+ $lib->{TARGET} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}";
$lib->{OUTPUT} = $lib->{TARGET};
}
@@ -105,7 +103,6 @@
$bin->{DEPEND_LIST} = [];
push(@{$bin->{LINK_FLAGS}}, "\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)");
- $bin->{RELEASEDIR} = "bin/install";
$bin->{DEBUGDIR} = "bin/";
$bin->{TARGET} = $bin->{OUTPUT} = "$bin->{DEBUGDIR}/$bin->{NAME}";
$bin->{BINARY} = $bin->{NAME};
Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk 2006-11-06 16:11:52 UTC (rev 19573)
+++ branches/SAMBA_4_0/source/main.mk 2006-11-06 16:57:00 UTC (rev 19574)
@@ -253,8 +253,7 @@
@-rm -f $(BIN_PROGS) $(SBIN_PROGS) $(BINARIES) $(TORTURE_PROGS)
@echo Removing libraries
@-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES)
- @-rm -f bin/*.$(SHLIBEXT)*
- @-rm -f bin/*.a
+ @-rm -f bin/*.a bin/shared/*.$(SHLIBEXT)
@echo Removing modules
@-rm -f bin/modules/*/*.$(SHLIBEXT)
@-rm -f bin/*_init_module.c
Property changes on: branches/SAMBA_4_0/source/param
___________________________________________________________________
Name: svn:ignore
- *.pc
proto.h
*.d
*.po32
*.po
share_proto.h
+ secrets_proto.h
*.pc
proto.h
*.d
*.po32
*.po
share_proto.h
More information about the samba-cvs
mailing list