summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-07 16:41:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:32 -0500
commitceb6e9717bf8ea5c83a01e159a7006fd8651620c (patch)
tree79b965506d85c0abcd5f14d22b86828d4caabdba /source4/build
parent967bff7d88f478b49bba9e04244fd9239c0cf3c8 (diff)
downloadsamba-ceb6e9717bf8ea5c83a01e159a7006fd8651620c.tar.gz
samba-ceb6e9717bf8ea5c83a01e159a7006fd8651620c.tar.bz2
samba-ceb6e9717bf8ea5c83a01e159a7006fd8651620c.zip
r13960: Generate makefile rules for installing/removing shared modules.
(This used to be commit 2c746980328431ab04852dc668899e3eb042da99)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/TODO13
-rw-r--r--source4/build/smb_build/makefile.pm15
2 files changed, 19 insertions, 9 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO
index 6b5ebbb8ba..69c8d98fc7 100644
--- a/source4/build/smb_build/TODO
+++ b/source4/build/smb_build/TODO
@@ -1,11 +1,10 @@
-- for each subsystem:
- - include line in Makefile
- - rule in Makefile
- -
- sonames
-- get rid of include/structs.h
+- saner names for some of the .pc files
+- get rid of include/structs.h and include/proto.h
- add register function to smbtorture
-- install shared modules
- improve (un)install scripts (rewrite in perl?)
-- proper #include dependencies
+- proper #include dependencies:
+ for each subsystem:
+ - include line in Makefile
+ - rule in Makefile
- determine dependencies from #include lines ?
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 269deb5ddd..44b54a5058 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -24,6 +24,8 @@ sub new($$$)
$self->{static_libs} = [];
$self->{shared_libs} = [];
$self->{headers} = [];
+ $self->{install_plugins} = "";
+ $self->{uninstall_plugins} = "";
$self->{pc_files} = [];
$self->{proto_headers} = [];
$self->{output} = "";
@@ -264,8 +266,14 @@ sub SharedLibrary($$)
$installdir = "bin";
}
- push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}");
- push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ if ($ctx->{TYPE} eq "LIBRARY") {
+ push (@{$self->{shared_libs}}, "bin/$ctx->{LIBRARY_REALNAME}");
+ } elsif ($ctx->{TYPE} eq "MODULE") {
+ push (@{$self->{shared_modules}}, "bin/$ctx->{LIBRARY_REALNAME}");
+
+ $self->{install_plugins} .= "\t\@cp $installdir/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{NAME}.\$(SHLIBEXT)\n";
+ $self->{uninstall_plugins} .= "\t\@rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{NAME}.\$(SHLIBEXT)\n";
+ }
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "CFLAGS");
@@ -552,6 +560,9 @@ sub write($$)
$self->output("PROTO_HEADERS = " . array2oneperline($self->{proto_headers}) . "\n");
$self->output("SHARED_MODULES = " . array2oneperline($self->{shared_modules}) . "\n");
+ $self->output("\ninstallplugins: \$(SHARED_MODULES)\n".$self->{install_plugins}."\n");
+ $self->output("\nuninstallplugins:\n".$self->{uninstall_plugins}."\n");
+
$self->_prepare_mk_files();
if ($self->{developer}) {