summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-06-05 19:46:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:31 -0500
commitbd54b891c1595fbf4ae8f99eaacc297591cb4689 (patch)
tree31ace94c972cfe87e7110309a15fd960bbc285d1
parent39e465a0965b7974c95f318db240d47cced37874 (diff)
downloadsamba-bd54b891c1595fbf4ae8f99eaacc297591cb4689.tar.gz
samba-bd54b891c1595fbf4ae8f99eaacc297591cb4689.tar.bz2
samba-bd54b891c1595fbf4ae8f99eaacc297591cb4689.zip
r1036: Get module initialisation function correct when building shared
(This used to be commit 8238acef47b754f91645c51326451c7ca153d992)
-rw-r--r--source4/build/smb_build/smb_build_h.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/build/smb_build/smb_build_h.pl b/source4/build/smb_build/smb_build_h.pl
index 7a829dd684..59e96574bd 100644
--- a/source4/build/smb_build/smb_build_h.pl
+++ b/source4/build/smb_build/smb_build_h.pl
@@ -32,6 +32,9 @@ sub _prepare_smb_build_h($)
my $DEFINE = ();
my $name = lc($NAME);
+ #
+ # Static modules
+ #
$DEFINE->{COMMENT} = "SUBSYSTEM $NAME INIT";
$DEFINE->{KEY} = "static_init_$name";
$DEFINE->{VAL} = "do { \\\n";
@@ -39,6 +42,23 @@ sub _prepare_smb_build_h($)
$DEFINE->{VAL} .= "\t\t$subkey\_init(); \\\n";
}
$DEFINE->{VAL} .= "\t} while(0)";
+
+ push(@{$CTX->{OUTPUT}{SMB_BUILD_H}},$DEFINE);
+
+ }
+
+ #
+ # Shared modules
+ #
+ foreach my $key (sort keys %{$CTX->{INPUT}{MODULES}}) {
+ next if ($CTX->{INPUT}{MODULES}{$key}{BUILD} ne "SHARED");
+
+ my $name = $CTX->{INPUT}{MODULES}{$key}{NAME};
+ my $DEFINE = ();
+
+ $DEFINE->{COMMENT} = "$name is built shared";
+ $DEFINE->{KEY} = "$name\_init";
+ $DEFINE->{VAL} = "init_module";
push(@{$CTX->{OUTPUT}{SMB_BUILD_H}},$DEFINE);
}