summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth.c3
-rw-r--r--source4/auth/config.mk14
-rw-r--r--source4/auth/gensec/config.mk2
-rw-r--r--source4/auth/gensec/gensec.c1
-rw-r--r--source4/build/m4/public.m44
-rw-r--r--source4/build/make/rules.mk1
-rw-r--r--source4/build/smb_build/config_mk.pm1
-rwxr-xr-xsource4/build/smb_build/dot.pl4
-rw-r--r--source4/build/smb_build/header.pm82
-rw-r--r--source4/build/smb_build/main.pl22
-rw-r--r--source4/build/smb_build/makefile.pm184
-rw-r--r--source4/build/smb_build/output.pm2
-rw-r--r--source4/cldap_server/config.mk2
-rw-r--r--source4/dsdb/config.mk2
-rw-r--r--source4/dsdb/samdb/ldb_modules/config.mk58
-rw-r--r--source4/kdc/config.mk2
-rw-r--r--source4/ldap_server/config.mk2
-rw-r--r--source4/lib/events/events.c3
-rw-r--r--source4/lib/ldb/common/ldb_modules.c1
-rw-r--r--source4/lib/ldb/config.mk14
-rw-r--r--source4/lib/nss_wrapper/config.mk1
-rw-r--r--source4/lib/registry/interface.c1
-rw-r--r--source4/lib/registry/local.c1
-rw-r--r--source4/librpc/config.mk11
-rw-r--r--source4/nbt_server/config.mk2
-rw-r--r--source4/ntptr/ntptr_base.c1
-rw-r--r--source4/ntvfs/ntvfs_base.c1
-rw-r--r--source4/ntvfs/sysdep/config.mk3
-rw-r--r--source4/ntvfs/sysdep/sys_notify.c1
-rw-r--r--source4/param/config.mk6
-rw-r--r--source4/param/share.c1
-rw-r--r--source4/rpc_server/config.mk26
-rw-r--r--source4/rpc_server/dcerpc_server.c1
-rw-r--r--source4/rpc_server/service_rpc.c3
-rw-r--r--source4/scripting/ejs/config.mk4
-rw-r--r--source4/scripting/ejs/smbcalls.c1
-rw-r--r--source4/scripting/python/config.mk4
-rw-r--r--source4/scripting/python/modules.c1
-rw-r--r--source4/smb_server/config.mk2
-rw-r--r--source4/smbd/process_model.c1
-rw-r--r--source4/smbd/server.c3
-rw-r--r--source4/torture/smbtorture.c1
-rw-r--r--source4/torture/torture.c1
-rw-r--r--source4/web_server/config.mk2
-rw-r--r--source4/winbind/config.mk2
-rw-r--r--source4/wrepl_server/config.mk2
46 files changed, 144 insertions, 343 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index 6c86cf2d7c..c4cb42779b 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -23,7 +23,6 @@
#include "auth/auth.h"
#include "auth/auth_proto.h"
#include "lib/events/events.h"
-#include "build.h"
#include "param/param.h"
/***************************************************************************
@@ -522,7 +521,7 @@ _PUBLIC_ NTSTATUS auth_init(void)
extern NTSTATUS auth_unix_init(void);
extern NTSTATUS auth_sam_init(void);
- init_module_fn static_init[] = { STATIC_auth_MODULES };
+ init_module_fn static_init[] = { STATIC_service_auth_MODULES };
if (initialized) return NT_STATUS_OK;
initialized = true;
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index 7d4678b7ac..dd55071186 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -36,7 +36,7 @@ auth_sam_reply_OBJ_FILES = $(addprefix auth/, auth_sam_reply.o)
[MODULE::auth_sam_module]
# gensec_krb5 and gensec_gssapi depend on it
INIT_FUNCTION = auth_sam_init
-SUBSYSTEM = auth
+SUBSYSTEM = service_auth
PRIVATE_DEPENDENCIES = \
SAMDB auth_sam
# End MODULE auth_sam
@@ -48,7 +48,7 @@ auth_sam_module_OBJ_FILES = $(addprefix auth/, auth_sam.o)
# Start MODULE auth_anonymous
[MODULE::auth_anonymous]
INIT_FUNCTION = auth_anonymous_init
-SUBSYSTEM = auth
+SUBSYSTEM = service_auth
# End MODULE auth_anonymous
#######################
@@ -58,7 +58,7 @@ auth_anonymous_OBJ_FILES = $(addprefix auth/, auth_anonymous.o)
# Start MODULE auth_winbind
[MODULE::auth_winbind]
INIT_FUNCTION = auth_winbind_init
-SUBSYSTEM = auth
+SUBSYSTEM = service_auth
PRIVATE_DEPENDENCIES = NDR_WINBIND MESSAGING LIBWINBIND-CLIENT
# End MODULE auth_winbind
#######################
@@ -69,7 +69,7 @@ auth_winbind_OBJ_FILES = $(addprefix auth/, auth_winbind.o)
# Start MODULE auth_developer
[MODULE::auth_developer]
INIT_FUNCTION = auth_developer_init
-SUBSYSTEM = auth
+SUBSYSTEM = service_auth
# End MODULE auth_developer
#######################
@@ -77,7 +77,7 @@ auth_developer_OBJ_FILES = $(addprefix auth/, auth_developer.o)
[MODULE::auth_unix]
INIT_FUNCTION = auth_unix_init
-SUBSYSTEM = auth
+SUBSYSTEM = service_auth
PRIVATE_DEPENDENCIES = CRYPT PAM PAM_ERRORS NSS_WRAPPER
auth_unix_OBJ_FILES = $(addprefix auth/, auth_unix.o)
@@ -85,13 +85,11 @@ auth_unix_OBJ_FILES = $(addprefix auth/, auth_unix.o)
[SUBSYSTEM::PAM_ERRORS]
PRIVATE_PROTO_HEADER = pam_errors.h
-#VERSION = 0.0.1
-#SO_VERSION = 0
PAM_ERRORS_OBJ_FILES = $(addprefix auth/, pam_errors.o)
[MODULE::auth]
INIT_FUNCTION = server_service_auth_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = auth_proto.h
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index cfb3493484..61663d9633 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -20,7 +20,7 @@ PUBLIC_HEADERS += auth/gensec/gensec.h
[MODULE::gensec_krb5]
SUBSYSTEM = gensec
INIT_FUNCTION = gensec_krb5_init
-PRIVATE_DEPENDENCIES = CREDENTIALS KERBEROS auth auth_sam
+PRIVATE_DEPENDENCIES = CREDENTIALS KERBEROS service_auth auth_sam
# End MODULE gensec_krb5
################################################
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index c82b719dfd..0edb34d740 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -23,7 +23,6 @@
#include "includes.h"
#include "auth/auth.h"
#include "lib/events/events.h"
-#include "build.h"
#include "librpc/rpc/dcerpc.h"
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 1eae998ca4..ba8251e65d 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -37,13 +37,13 @@ ENABLE = YES
"
])
-dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags)
+dnl SMB_LIBRARY(name,obj_files,required_subsystems,cflags,ldflags)
AC_DEFUN([SMB_LIBRARY],
[
MAKE_SETTINGS="$MAKE_SETTINGS
$1_CFLAGS = $6
$1_LDFLAGS = $7
-$1_ENABLE = YES
+n1_ENABLE = YES
$1_OBJ_FILES = $2
"
diff --git a/source4/build/make/rules.mk b/source4/build/make/rules.mk
index 541fa018db..078f5d9295 100644
--- a/source4/build/make/rules.mk
+++ b/source4/build/make/rules.mk
@@ -216,7 +216,6 @@ include/includes.d: include/includes.h
$(COMPILE) >/dev/null 2>&1
-
.c.ho:
@echo "Compiling $< with host compiler"
@-mkdir -p `dirname $@`
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 307c391e07..7b23e83934 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -244,7 +244,6 @@ sub run_config_mk($$$$)
$infragment = 1;
next;
}
-
# Assignment
if ($line =~ /^([a-zA-Z0-9_]+)[\t ]*=(.*)$/) {
diff --git a/source4/build/smb_build/dot.pl b/source4/build/smb_build/dot.pl
index e50ee50f95..b30c320c6e 100755
--- a/source4/build/smb_build/dot.pl
+++ b/source4/build/smb_build/dot.pl
@@ -26,10 +26,10 @@ sub generate($$$)
foreach my $part (values %{$depend}) {
next if (defined($only) and not contains($only,$part->{NAME}));
foreach my $elem (@{$part->{PUBLIC_DEPENDENCIES}}) {
- $res .= "\t\"$part->{NAME}\" -> \"$elem\"; /* public */\n";
+ $res .= "\t\"$part->{NAME}\" -> \"$elem\" [style=filled]; /* public */\n";
}
foreach my $elem (@{$part->{PRIVATE_DEPENDENCIES}}) {
- $res .= "\t\"$part->{NAME}\" -> \"$elem\"; /* private */\n";
+ $res .= "\t\"$part->{NAME}\" -> \"$elem\" [style=dotted]; /* private */\n";
}
}
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
deleted file mode 100644
index dfb7c62e54..0000000000
--- a/source4/build/smb_build/header.pm
+++ /dev/null
@@ -1,82 +0,0 @@
-# SMB Build System
-# - create output for build.h
-#
-# Copyright (C) Stefan (metze) Metzmacher 2004
-# Copyright (C) Jelmer Vernooij 2005
-# Released under the GNU GPL
-
-package header;
-use strict;
-
-sub _add_define_section($)
-{
- my $DEFINE = shift;
- my $output = "";
-
- $output .= "
-/* $DEFINE->{COMMENT} */
-#define $DEFINE->{KEY} $DEFINE->{VAL}
-";
-
- return $output;
-}
-
-sub _prepare_build_h($)
-{
- my $depend = shift;
- my @defines = ();
- my $output = "";
-
- foreach my $key (values %$depend) {
- my $DEFINE = ();
- next if ($key->{TYPE} ne "LIBRARY" and
- $key->{TYPE} ne "MODULE" and
- $key->{TYPE} ne "SUBSYSTEM" and
- $key->{TYPE} ne "BINARY");
- next unless defined($key->{INIT_FUNCTIONS});
-
- my $name = $key->{NAME};
- $name =~ s/-/_/g;
- $DEFINE->{COMMENT} = "$key->{TYPE} $key->{NAME} INIT";
- $DEFINE->{KEY} = "STATIC_$name\_MODULES";
- $DEFINE->{VAL} = "\\\n";
- foreach (@{$key->{INIT_FUNCTIONS}}) {
- $DEFINE->{VAL} .= "\t$_, \\\n";
- }
-
- die("Invalid sentinel") unless ($key->{INIT_FUNCTION_SENTINEL});
- $DEFINE->{VAL} .= "\t$key->{INIT_FUNCTION_SENTINEL} \n";
-
- push(@defines,$DEFINE);
- }
-
- #
- # loop over all BUILD_H define sections
- #
- foreach (@defines) { $output .= _add_define_section($_); }
-
- return $output;
-}
-
-###########################################################
-# This function creates include/build.h from the SMB_BUILD
-# context
-#
-# create_build_h($SMB_BUILD_CTX)
-#
-# $SMB_BUILD_CTX - the global SMB_BUILD context
-#
-# $output - the resulting output buffer
-sub create_smb_build_h($$)
-{
- my ($CTX, $file) = @_;
-
- open(BUILD_H,">$file") || die ("Can't open `$file'\n");
- print BUILD_H "/* autogenerated by build/smb_build/main.pl */\n";
- print BUILD_H _prepare_build_h($CTX);
- close(BUILD_H);
-
- print __FILE__.": creating $file\n";
-}
-
-1;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 14897840a6..ccaac0b6fc 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -6,7 +6,6 @@
# Released under the GNU GPL
use smb_build::makefile;
-use smb_build::header;
use smb_build::input;
use smb_build::config_mk;
use smb_build::output;
@@ -50,21 +49,18 @@ foreach my $key (values %$OUTPUT) {
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
+ $mkenv->StaticLibraryPrimitives($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->MergedObj($key) if grep(/MERGED_OBJ/, @{$key->{OUTPUT_TYPE}});
- $mkenv->StaticLibraryPrimitives($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
- if (defined($key->{PC_FILE})) {
- $mkenv->output("PC_FILES += $key->{BASEDIR}/$key->{PC_FILE}\n");
- }
- $mkenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
+ $kenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if ($key->{TYPE} eq "LIBRARY" and
${$key->{OUTPUT_TYPE}}[0] eq "SHARED_LIBRARY") {
$shared_libs_used = 1;
}
- $mkenv->SharedModulePrimitives($key) if ($key->{TYPE} eq "MODULE" or
- $key->{TYPE} eq "PYTHON") and
- grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
+ if ($key->{TYPE} eq "MODULE" and @{$key->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ" and defined($key->{INIT_FUNCTION})) {
+ $mkenv->output("$key->{SUBSYSTEM}_INIT_FUNCTIONS += $key->{INIT_FUNCTION},\n");
+ }
$mkenv->CFlags($key);
}
@@ -80,15 +76,15 @@ foreach my $key (values %$OUTPUT) {
$mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
- $mkenv->SharedModule($key) if ($key->{TYPE} eq "MODULE" or
- $key->{TYPE} eq "PYTHON") and
- grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
+ $mkenv->SharedModule($key) if ($key->{TYPE} eq "MODULE" and
+ grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}}));
+ $mkenv->PythonModule($key) if ($key->{TYPE} eq "PYTHON");
$mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER});
+ $mkenv->InitFunctions($key) if defined($key->{INIT_FUNCTIONS});
}
$mkenv->write("data.mk");
-header::create_smb_build_h($OUTPUT, "include/build.h");
summary::show($OUTPUT, \%config::config);
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 8f3f1701b7..c56fdbf8cc 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -72,17 +72,7 @@ sub _prepare_mk_files($)
push (@tmp, $_);
}
- $self->output("
-ifneq (\$(MAKECMDGOALS),clean)
-ifneq (\$(MAKECMDGOALS),distclean)
-ifneq (\$(MAKECMDGOALS),realdistclean)
-");
$self->output("MK_FILES = " . array2oneperline(\@tmp) . "\n");
- $self->output("
-endif
-endif
-endif
-");
}
sub array2oneperline($)
@@ -112,94 +102,41 @@ sub _prepare_list($$$)
$self->output("$ctx->{NAME}_$var =$tmplist\n");
}
-sub SharedModulePrimitives($$)
+sub PythonModule($$)
{
my ($self,$ctx) = @_;
-
- #FIXME
+
+ $self->_prepare_list($ctx, "FULL_OBJ_LIST");
+ $self->_prepare_list($ctx, "DEPEND_LIST");
+ $self->_prepare_list($ctx, "LINK_FLAGS");
+
+ $self->output("\$(eval \$(call python_c_module_template,$ctx->{LIBRARY_REALNAME},\$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS)))\n");
}
sub SharedModule($$)
{
my ($self,$ctx) = @_;
- my $init_obj = "";
-
my $sane_subsystem = lc($ctx->{SUBSYSTEM});
$sane_subsystem =~ s/^lib//;
- if ($ctx->{TYPE} eq "PYTHON") {
- $self->output("PYTHON_DSOS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
- } else {
- $self->output("PLUGINS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
- $self->output("installplugins:: $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
- $self->output("\t\@echo Installing $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
- $self->output("\t\@mkdir -p \$(DESTDIR)\$(modulesdir)/$sane_subsystem/\n");
- $self->output("\t\@cp $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
- if (defined($ctx->{ALIASES})) {
- foreach (@{$ctx->{ALIASES}}) {
- $self->output("\t\@rm -f \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
- $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
- }
- }
+ $self->output("PLUGINS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
+ $self->output("\$(eval \$(call shared_module_install_template,$sane_subsystem, $ctx->{LIBRARY_REALNAME}))\n");
- $self->output("uninstallplugins::\n");
- $self->output("\t\@echo Uninstalling \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
- $self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$ctx->{LIBRARY_REALNAME}\n");
-
- if (defined($ctx->{ALIASES})) {
- foreach (@{$ctx->{ALIASES}}) {
- $self->output("\t\@-rm \$(DESTDIR)\$(modulesdir)/$sane_subsystem/$_.\$(SHLIBEXT)\n");
- }
- }
- }
-
- $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
- if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON" and
- $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/) {
- my $init_fn = $ctx->{INIT_FUNCTION_TYPE};
- $init_fn =~ s/\(\*\)/init_module/;
- my $proto_fn = $ctx->{INIT_FUNCTION_TYPE};
- $proto_fn =~ s/\(\*\)/$ctx->{INIT_FUNCTION}/;
-
- $self->output(<< "__EOD__"
-bin/$ctx->{NAME}_init_module.c:
- \@echo Creating \$\@
- \@echo \"#include \\\"includes.h\\\"\" > \$\@
- \@echo \"$proto_fn;\" >> \$\@
- \@echo \"_PUBLIC_ $init_fn\" >> \$\@
- \@echo \"{\" >> \$\@
- \@echo \" return $ctx->{INIT_FUNCTION}();\" >> \$\@
- \@echo \"}\" >> \$\@
- \@echo \"\" >> \$\@
-__EOD__
-);
- $init_obj = "bin/$ctx->{NAME}_init_module.o";
+ if (defined($ctx->{INIT_FUNCTION}) and $ctx->{INIT_FUNCTION_TYPE} =~ /\(\*\)/) {
+ $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n");
}
- $self->output(<< "__EOD__"
-#
+ $self->output("\$(eval \$(call shared_module_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS)))\n");
-$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) $init_obj
- \@echo Linking \$\@
- \@mkdir -p $ctx->{SHAREDDIR}
- \@\$(MDLD) \$(LDFLAGS) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
- \$($ctx->{NAME}\_FULL_OBJ_LIST) $init_obj \\
- \$($ctx->{NAME}_LINK_FLAGS)
-__EOD__
-);
if (defined($ctx->{ALIASES})) {
- foreach (@{$ctx->{ALIASES}}) {
- $self->output("\t\@rm -f $ctx->{SHAREDDIR}/$_.\$(SHLIBEXT)\n");
- $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$_.\$(SHLIBEXT)\n");
- }
+ $self->output("\$(eval \$(foreach alias,". join(' ', @{$ctx->{ALIASES}}) . ",\$(call shared_module_alias_template,$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME},$sane_subsystem,\$(alias))))\n");
}
- $self->output("\n");
}
sub StaticLibraryPrimitives($$)
@@ -224,59 +161,41 @@ sub SharedLibrary($$)
{
my ($self,$ctx) = @_;
- if (!defined($ctx->{LIBRARY_SONAME})) {
- $ctx->{LIBRARY_SONAME} = "";
- }
-
- $self->output("SHARED_LIBS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n");
+ $self->output("SHARED_LIBS += $ctx->{RESULT_SHARED_LIBRARY}\n");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
- $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) \\
- \$(if \$(SONAMEFLAG), \$(SONAMEFLAG)$ctx->{LIBRARY_SONAME})
-__EOD__
-);
- if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) {
- $self->output("ifneq (\$($ctx->{NAME}_VERSION),\$($ctx->{NAME}_SOVERSION))\n");
- $self->output("\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}\n");
- $self->output("endif\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");
+ $self->output("\$(eval \$(call shared_library_template,$ctx->{RESULT_SHARED_LIBRARY}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}\_FULL_OBJ_LIST) \$($ctx->{NAME}_LINK_FLAGS),$ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME},$ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}))\n");
}
sub MergedObj($$)
{
my ($self, $ctx) = @_;
- return unless defined($ctx->{OUTPUT});
+ $self->output("\$(call partial_link_template, $ctx->{OUTPUT}, \$($ctx->{NAME}_OBJ_FILES))\n");
+}
+
+sub StaticLibraryPrimitives($$)
+{
+ my ($self,$ctx) = @_;
$self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
- $self->output(<< "__EOD__"
-#
-$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_OBJ_FILES)
- \@echo Partially linking \$@
- \@mkdir -p \$(\@D)
- \$(PARTLINK) -o \$@ \$($ctx->{NAME}_OBJ_FILES)
+ $self->_prepare_list($ctx, "FULL_OBJ_LIST");
+}
-__EOD__
-);
+sub InitFunctions($$)
+{
+ my ($self, $ctx) = @_;
+ $self->output("\$($ctx->{NAME}_OBJ_FILES): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\"\n");
}
sub StaticLibrary($$)
{
my ($self,$ctx) = @_;
- $self->output("STATIC_LIBS += $ctx->{TARGET_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY");
-
+ $self->output("STATIC_LIBS += $ctx->{RESULT_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY");
+ $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
$self->output("$ctx->{RESULT_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST)\n");
}
@@ -285,37 +204,21 @@ sub Binary($$)
my ($self,$ctx) = @_;
unless (defined($ctx->{INSTALLDIR})) {
+ $self->output("BINARIES += $ctx->{TARGET_BINARY}\n");
} elsif ($ctx->{INSTALLDIR} eq "SBINDIR") {
- $self->output("SBIN_PROGS += bin/$ctx->{BINARY}\n");
+ $self->output("SBIN_PROGS += $ctx->{RESULT_BINARY}\n");
} elsif ($ctx->{INSTALLDIR} eq "BINDIR") {
- $self->output("BIN_PROGS += bin/$ctx->{BINARY}\n");
+ $self->output("BIN_PROGS += $ctx->{RESULT_BINARY}\n");
}
- $self->output("binaries:: $ctx->{TARGET_BINARY}\n");
-
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
-$self->output(<< "__EOD__"
-$ctx->{RESULT_BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
- \@echo Linking \$\@
-__EOD__
- );
-
if (defined($ctx->{USE_HOSTCC}) && $ctx->{USE_HOSTCC} eq "YES") {
- $self->output(<< "__EOD__"
- \@\$(HOSTLD) \$(HOSTLD_FLAGS) -L\${builddir}/bin/static -o \$\@ \$(INSTALL_LINK_FLAGS) \\
- \$\($ctx->{NAME}_LINK_FLAGS)
-__EOD__
- );
+$self->output("\$(call host_binary_link_template, $ctx->{RESULT_BINARY}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}_LINK_FLAGS))\n");
} else {
- $self->output(<< "__EOD__"
- \@\$(BNLD) \$(BNLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
- \$\($ctx->{NAME}_LINK_FLAGS)
-
-__EOD__
- );
+$self->output("\$(call binary_link_template, $ctx->{RESULT_BINARY}, \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST), \$($ctx->{NAME}_LINK_FLAGS))\n");
}
}
@@ -324,10 +227,7 @@ sub PythonFiles($$)
my ($self,$ctx) = @_;
foreach (@{$ctx->{PYTHON_FILES}}) {
- my $target = "bin/python/".basename($_);
- my $source = "\$(addprefix $ctx->{BASEDIR}/, $_)";
- $self->output("$target: $source\n\n");
- $self->output("PYTHON_PYS += $target\n");
+ $self->output("\$(eval \$(call python_py_module_template," . basename($_) . ",\$(addprefix $ctx->{BASEDIR}/, $_)))\n");
}
}
@@ -335,25 +235,17 @@ sub ProtoHeader($$)
{
my ($self,$ctx) = @_;
- my $priv = "$ctx->{BASEDIR}/$ctx->{PRIVATE_PROTO_HEADER}";
- $self->output("PROTO_HEADERS += $priv\n");
-
- $self->output("$priv: $ctx->{MK_FILE} \$($ctx->{NAME}_OBJ_FILES:.o=.c) \$(srcdir)/script/mkproto.pl\n");
- $self->output("\t\@echo \"Creating \$@\"\n");
- $self->output("\t\@mkdir -p \$(\@D)\n");
- $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --srcdir=\$(srcdir) --builddir=\$(builddir) --public=/dev/null --private=\$@ \$($ctx->{NAME}_OBJ_FILES)\n\n");
+ my $target = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
+ $self->output("PROTO_HEADERS += $target\n");
+ $self->output("\$(call proto_header_template, $target, \$($ctx->{NAME}_OBJ_FILES:.o=.c))\n");
}
sub write($$)
{
my ($self, $file) = @_;
- $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n");
-
$self->_prepare_mk_files();
- $self->output($self->{mkfile});
-
open(MAKEFILE,">$file") || die ("Can't open $file\n");
print MAKEFILE $self->{output};
close(MAKEFILE);
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index aeff7d48ce..f9f12c3a73 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -154,7 +154,7 @@ sub create_output($$)
push (@{$part->{FULL_OBJ_LIST}}, $elem->{TARGET});
} else {
push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT});
- push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET});
+ push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if (defined($elem->{TARGET}));
}
}
}
diff --git a/source4/cldap_server/config.mk b/source4/cldap_server/config.mk
index c10cf57b5b..0773412bfd 100644
--- a/source4/cldap_server/config.mk
+++ b/source4/cldap_server/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM CLDAPD
[MODULE::CLDAPD]
INIT_FUNCTION = server_service_cldapd_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = \
LIBCLI_CLDAP LIBNETIF process_model
diff --git a/source4/dsdb/config.mk b/source4/dsdb/config.mk
index e334e4c6e3..e621391617 100644
--- a/source4/dsdb/config.mk
+++ b/source4/dsdb/config.mk
@@ -44,7 +44,7 @@ SAMDB_SCHEMA_OBJ_FILES = $(addprefix dsdb/schema/, \
# Start SUBSYSTEM DREPL_SRV
[MODULE::DREPL_SRV]
INIT_FUNCTION = server_service_drepl_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = repl/drepl_service_proto.h
PRIVATE_DEPENDENCIES = \
SAMDB \
diff --git a/source4/dsdb/samdb/ldb_modules/config.mk b/source4/dsdb/samdb/ldb_modules/config.mk
index 414b449ba8..69bfa14da0 100644
--- a/source4/dsdb/samdb/ldb_modules/config.mk
+++ b/source4/dsdb/samdb/ldb_modules/config.mk
@@ -4,7 +4,11 @@
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR NDR_MISC
+<<<<<<< HEAD:source/dsdb/samdb/ldb_modules/config.mk
+INIT_FUNCTION = LDB_MODULE(objectguid)
+=======
INIT_FUNCTION = objectguid_module_module_ops
+>>>>>>> 5f3a70f285ad8a412105c0e498e486f93fc279bc:source/dsdb/samdb/ldb_modules/config.mk
# End MODULE ldb_objectguid
################################################
@@ -17,7 +21,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC LIBNDR NDR_MISC NDR_DRSUAPI \
NDR_DRSBLOBS LIBNDR
-INIT_FUNCTION = repl_meta_data_module_module_ops
+INIT_FUNCTION = LDB_MODULE(repl_meta_data)
# End MODULE ldb_repl_meta_data
################################################
@@ -30,7 +34,7 @@ ldb_repl_meta_data_OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = dsdb_cache_module_module_ops
+INIT_FUNCTION = LDB_MODULE(dsdb_cache)
# End MODULE ldb_dsdb_cache
################################################
@@ -43,7 +47,7 @@ ldb_dsdb_cache_OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = schema_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(schema_fsmo)
# End MODULE ldb_schema_fsmo
################################################
@@ -56,7 +60,7 @@ ldb_schema_fsmo_OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = naming_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(naming_fsmo)
# End MODULE ldb_naming_fsmo
################################################
@@ -69,7 +73,7 @@ ldb_naming_fsmo_OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = SAMDB LIBTALLOC
-INIT_FUNCTION = pdc_fsmo_module_module_ops
+INIT_FUNCTION = LDB_MODULE(pdc_fsmo)
# End MODULE ldb_pdc_fsmo
################################################
@@ -82,7 +86,7 @@ ldb_pdc_fsmo_OBJ_FILES = \
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LDAP_ENCODE NDR_MISC SAMDB
-INIT_FUNCTION = samldb_module_module_ops
+INIT_FUNCTION = LDB_MODULE(samldb)
#
# End MODULE ldb_samldb
################################################
@@ -95,10 +99,9 @@ ldb_samldb_OBJ_FILES = \
[MODULE::ldb_samba3sam]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_samba3sam_module_module_ops
+INIT_FUNCTION = LDB_MODULE(samba3sam)
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map SMBPASSWD NSS_WRAPPER LIBSECURITY \
NDR_SECURITY
-#
# End MODULE ldb_samldb
################################################
@@ -110,11 +113,10 @@ ldb_samba3sam_OBJ_FILES = \
[MODULE::ldb_simple_ldap_map]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = &ldb_simple_ldap_map_module_module_ops
+INIT_FUNCTION = LDB_MODULE(simple_ldap_map)
PRIVATE_DEPENDENCIES = LIBTALLOC ldb_map LIBNDR NDR_MISC
ENABLE = YES
ALIASES = entryuuid nsuniqueid
-#
# End MODULE ldb_entryuuid
################################################
@@ -125,7 +127,7 @@ ldb_simple_ldap_map_OBJ_FILES = \
# # Start MODULE ldb_proxy
# [MODULE::ldb_proxy]
# SUBSYSTEM = LIBLDB
-# INIT_FUNCTION = proxy_module_module_ops
+# INIT_FUNCTION = LDB_MODULE(proxy)
# OBJ_FILES = \
# proxy.o
#
@@ -139,7 +141,7 @@ ldb_simple_ldap_map_OBJ_FILES = \
SUBSYSTEM = LIBLDB
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = rootdse_module_module_ops
+INIT_FUNCTION = LDB_MODULE(rootdse)
# End MODULE ldb_rootdse
################################################
@@ -150,7 +152,7 @@ ldb_rootdse_OBJ_FILES = dsdb/samdb/ldb_modules/rootdse.o
[MODULE::ldb_password_hash]
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
-INIT_FUNCTION = password_hash_module_module_ops
+INIT_FUNCTION = LDB_MODULE(password_hash)
PRIVATE_DEPENDENCIES = HEIMDAL_HDB_KEYS LIBTALLOC HEIMDAL_KRB5 LDAP_ENCODE \
LIBCLI_AUTH NDR_DRSBLOBS KERBEROS SAMDB
# End MODULE ldb_password_hash
@@ -164,7 +166,7 @@ ldb_password_hash_OBJ_FILES = dsdb/samdb/ldb_modules/password_hash.o
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = local_password_module_module_ops
+INIT_FUNCTION = LDB_MODULE(local_password)
# End MODULE ldb_local_password
################################################
@@ -176,7 +178,7 @@ ldb_local_password_OBJ_FILES = dsdb/samdb/ldb_modules/local_password.o
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY SAMDB
OUTPUT_TYPE = SHARED_LIBRARY
SUBSYSTEM = LIBLDB
-INIT_FUNCTION = &ldb_kludge_acl_module_ops
+INIT_FUNCTION = LDB_MODULE(kludge_acl)
# End MODULE ldb_kludge_acl
################################################
@@ -189,7 +191,7 @@ ldb_kludge_acl_OBJ_FILES = dsdb/samdb/ldb_modules/kludge_acl.o
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBNDR LIBSECURITY SAMDB
-INIT_FUNCTION = &ldb_extended_dn_module_ops
+INIT_FUNCTION = LDB_MODULE(extended_dn)
# End MODULE ldb_extended_dn
################################################
@@ -201,7 +203,7 @@ ldb_extended_dn_OBJ_FILES = dsdb/samdb/ldb_modules/extended_dn.o
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_show_deleted_module_ops
+INIT_FUNCTION = LDB_MODULE(show_deleted)
# End MODULE ldb_show_deleted
################################################
@@ -213,7 +215,7 @@ ldb_show_deleted_OBJ_FILES = dsdb/samdb/ldb_modules/show_deleted.o
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
-INIT_FUNCTION = &ldb_partition_module_ops
+INIT_FUNCTION = LDB_MODULE(partition)
# End MODULE ldb_partition
################################################
@@ -225,7 +227,7 @@ ldb_partition_OBJ_FILES = dsdb/samdb/ldb_modules/partition.o
SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBLDB
-INIT_FUNCTION = &ldb_schema_module_ops
+INIT_FUNCTION = LDB_MODULE(schema)
# End MODULE ldb_schema
################################################
@@ -238,7 +240,7 @@ SUBSYSTEM = LIBLDB
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC CREDENTIALS
#Also depends on credentials, but that would loop
-INIT_FUNCTION = &ldb_update_kt_module_ops
+INIT_FUNCTION = LDB_MODULE(update_kt)
# End MODULE ldb_update_kt
################################################
@@ -247,7 +249,7 @@ ldb_update_keytab_OBJ_FILES = dsdb/samdb/ldb_modules/update_keytab.o
################################################
# Start MODULE ldb_objectclass
[MODULE::ldb_objectclass]
-INIT_FUNCTION = &ldb_objectclass_module_ops
+INIT_FUNCTION = LDB_MODULE(objectclass)
OUTPUT_TYPE = SHARED_LIBRARY
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSECURITY NDR_SECURITY SAMDB
@@ -260,7 +262,7 @@ ldb_objectclass_OBJ_FILES = dsdb/samdb/ldb_modules/objectclass.o
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_rename]
-INIT_FUNCTION = &ldb_subtree_rename_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_rename)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -272,7 +274,7 @@ ldb_subtree_rename_OBJ_FILES = dsdb/samdb/ldb_modules/subtree_rename.o
################################################
# Start MODULE ldb_subtree_rename
[MODULE::ldb_subtree_delete]
-INIT_FUNCTION = &ldb_subtree_delete_module_ops
+INIT_FUNCTION = LDB_MODULE(subtree_delete)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -284,7 +286,7 @@ ldb_subtree_delete_OBJ_FILES = dsdb/samdb/ldb_modules/subtree_delete.o
################################################
# Start MODULE ldb_linked_attributes
[MODULE::ldb_linked_attributes]
-INIT_FUNCTION = &ldb_linked_attributes_module_ops
+INIT_FUNCTION = LDB_MODULE(linked_attributes)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC SAMDB
@@ -297,7 +299,7 @@ ldb_linked_attributes_OBJ_FILES = dsdb/samdb/ldb_modules/linked_attributes.o
################################################
# Start MODULE ldb_ranged_results
[MODULE::ldb_ranged_results]
-INIT_FUNCTION = &ldb_ranged_results_module_ops
+INIT_FUNCTION = LDB_MODULE(ranged_results)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -309,7 +311,7 @@ ldb_ranged_results_OBJ_FILES = dsdb/samdb/ldb_modules/ranged_results.o
################################################
# Start MODULE ldb_anr
[MODULE::ldb_anr]
-INIT_FUNCTION = &ldb_anr_module_ops
+INIT_FUNCTION = LDB_MODULE(anr)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -322,7 +324,7 @@ ldb_anr_OBJ_FILES = dsdb/samdb/ldb_modules/anr.o
################################################
# Start MODULE ldb_normalise
[MODULE::ldb_normalise]
-INIT_FUNCTION = &ldb_normalise_module_ops
+INIT_FUNCTION = LDB_MODULE(normalise)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC LIBSAMBA-UTIL SAMDB
@@ -335,7 +337,7 @@ ldb_normalise_OBJ_FILES = dsdb/samdb/ldb_modules/normalise.o
################################################
# Start MODULE ldb_instancetype
[MODULE::ldb_instancetype]
-INIT_FUNCTION = &ldb_instancetype_module_ops
+INIT_FUNCTION = LDB_MODULE(instancetype)
CFLAGS = -Ilib/ldb/include
OUTPUT_TYPE = SHARED_LIBRARY
PRIVATE_DEPENDENCIES = LIBTALLOC
diff --git a/source4/kdc/config.mk b/source4/kdc/config.mk
index 94ba933e57..7a96cf6432 100644
--- a/source4/kdc/config.mk
+++ b/source4/kdc/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM KDC
[MODULE::KDC]
INIT_FUNCTION = server_service_kdc_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = \
LIBLDB HEIMDAL HEIMDAL_KDC HEIMDAL_HDB SAMDB
# End SUBSYSTEM KDC
diff --git a/source4/ldap_server/config.mk b/source4/ldap_server/config.mk
index 03cc41d69d..47eb85cab9 100644
--- a/source4/ldap_server/config.mk
+++ b/source4/ldap_server/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM LDAP
[MODULE::LDAP]
INIT_FUNCTION = server_service_ldap_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = CREDENTIALS \
LIBCLI_LDAP SAMDB \
diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c
index 568aadc31e..6f45db512a 100644
--- a/source4/lib/events/events.c
+++ b/source4/lib/events/events.c
@@ -58,9 +58,6 @@
#include "lib/events/events_internal.h"
#include "lib/util/dlinklist.h"
#include "param/param.h"
-#if _SAMBA_BUILD_
-#include "build.h"
-#endif
struct event_ops_list {
struct event_ops_list *next, *prev;
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index eece9af5f7..ddbe0f23a6 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -35,7 +35,6 @@
#if (_SAMBA_BUILD_ >= 4)
#include "includes.h"
-#include "build.h"
#endif
#define LDB_MODULE_PREFIX "modules:"
diff --git a/source4/lib/ldb/config.mk b/source4/lib/ldb/config.mk
index 25219eb8b0..23e2ef71dd 100644
--- a/source4/lib/ldb/config.mk
+++ b/source4/lib/ldb/config.mk
@@ -3,7 +3,7 @@
[MODULE::ldb_asq]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
-INIT_FUNCTION = &ldb_asq_module_ops
+INIT_FUNCTION = LDB_MODULE(asq)
SUBSYSTEM = LIBLDB
ldb_asq_OBJ_FILES = lib/ldb/modules/asq.o
@@ -15,7 +15,7 @@ ldb_asq_OBJ_FILES = lib/ldb/modules/asq.o
[MODULE::ldb_server_sort]
PRIVATE_DEPENDENCIES = LIBTALLOC
CFLAGS = -Ilib/ldb/include
-INIT_FUNCTION = &ldb_server_sort_module_ops
+INIT_FUNCTION = LDB_MODULE(server_sort)
SUBSYSTEM = LIBLDB
# End MODULE ldb_sort
@@ -25,7 +25,7 @@ ldb_server_sort_OBJ_FILES = lib/ldb/modules/sort.o
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_results]
-INIT_FUNCTION = &ldb_paged_results_module_ops
+INIT_FUNCTION = LDB_MODULE(paged_results)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -37,7 +37,7 @@ ldb_paged_results_OBJ_FILES = lib/ldb/modules/paged_results.o
################################################
# Start MODULE ldb_paged_results
[MODULE::ldb_paged_searches]
-INIT_FUNCTION = &ldb_paged_searches_module_ops
+INIT_FUNCTION = LDB_MODULE(paged_searches)
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
SUBSYSTEM = LIBLDB
@@ -52,7 +52,7 @@ ldb_paged_searches_OBJ_FILES = lib/ldb/modules/paged_searches.o
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_operational_module_ops
+INIT_FUNCTION = LDB_MODULE(operational)
# End MODULE ldb_operational
################################################
@@ -64,7 +64,7 @@ ldb_operational_OBJ_FILES = lib/ldb/modules/operational.o
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_rdn_name_module_ops
+INIT_FUNCTION = LDB_MODULE(rdn_name)
# End MODULE ldb_rdn_name
################################################
@@ -86,7 +86,7 @@ ldb_map_OBJ_FILES = $(addprefix lib/ldb/ldb_map/, ldb_map_inbound.o ldb_map_outb
SUBSYSTEM = LIBLDB
CFLAGS = -Ilib/ldb/include
PRIVATE_DEPENDENCIES = LIBTALLOC
-INIT_FUNCTION = &ldb_skel_module_ops
+INIT_FUNCTION = LDB_MODULE(skel)
# End MODULE ldb_skel
################################################
diff --git a/source4/lib/nss_wrapper/config.mk b/source4/lib/nss_wrapper/config.mk
index 5f136a465d..61f6392008 100644
--- a/source4/lib/nss_wrapper/config.mk
+++ b/source4/lib/nss_wrapper/config.mk
@@ -4,4 +4,5 @@
# End SUBSYSTEM NSS_WRAPPER
##############################
+PUBLIC_HEADERS += lib/nss_wrapper/nss_wrapper.h
NSS_WRAPPER_OBJ_FILES = lib/nss_wrapper/nss_wrapper.o
diff --git a/source4/lib/registry/interface.c b/source4/lib/registry/interface.c
index a18fd2c28c..ff3ddf0a35 100644
--- a/source4/lib/registry/interface.c
+++ b/source4/lib/registry/interface.c
@@ -21,7 +21,6 @@
#include "lib/util/dlinklist.h"
#include "lib/registry/registry.h"
#include "system/filesys.h"
-#include "build.h"
/**
diff --git a/source4/lib/registry/local.c b/source4/lib/registry/local.c
index 903bbb0b80..47d6d4cd32 100644
--- a/source4/lib/registry/local.c
+++ b/source4/lib/registry/local.c
@@ -22,7 +22,6 @@
#include "lib/util/dlinklist.h"
#include "lib/registry/registry.h"
#include "system/filesys.h"
-#include "build.h"
struct reg_key_path {
uint32_t predefined_key;
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 11a320a583..c5820619d9 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -589,8 +589,7 @@ PC_FILES += librpc/dcerpc.pc
dcerpc_VERSION = 0.0.1
dcerpc_SOVERSION = 0
-dcerpc_OBJ_FILES = $(addprefix librpc/rpc/, dcerpc.o dcerpc_auth.o dcerpc_schannel.o dcerpc_util.o \
- binding.o \
+dcerpc_OBJ_FILES = $(addprefix librpc/rpc/, dcerpc.o dcerpc_auth.o dcerpc_schannel.o dcerpc_util.o binding.o \
dcerpc_error.o dcerpc_smb.o dcerpc_smb2.o dcerpc_sock.o dcerpc_connect.o dcerpc_secondary.o)
@@ -759,6 +758,8 @@ PRIVATE_DEPENDENCIES = dcerpc_samr PYTALLOC
python_samr_OBJ_FILES = librpc/gen_ndr/py_samr.o
+python_samr_OBJ_FILES = librpc/gen_ndr/py_samr.o
+
[PYTHON::python_svcctl]
PRIVATE_DEPENDENCIES = RPC_NDR_SVCCTL PYTALLOC
@@ -769,6 +770,8 @@ PRIVATE_DEPENDENCIES = RPC_NDR_LSA PYTALLOC
python_lsa_OBJ_FILES = librpc/gen_ndr/py_lsa.o
+python_lsa_OBJ_FILES = librpc/gen_ndr/py_lsa.o
+
[PYTHON::python_wkssvc]
PRIVATE_DEPENDENCIES = RPC_NDR_WKSSVC PYTALLOC
@@ -779,6 +782,8 @@ PRIVATE_DEPENDENCIES = RPC_NDR_DFS PYTALLOC
python_dfs_OBJ_FILES = librpc/gen_ndr/py_dfs.o
+python_dfs_OBJ_FILES = gen_ndr/py_dfs.o
+
[PYTHON::python_unixinfo]
PRIVATE_DEPENDENCIES = RPC_NDR_UNIXINFO PYTALLOC
@@ -789,6 +794,8 @@ PRIVATE_DEPENDENCIES = RPC_NDR_DRSUAPI PYTALLOC
python_drsuapi_OBJ_FILES = librpc/gen_ndr/py_drsuapi.o
+python_drsuapi_OBJ_FILES = gen_ndr/py_drsuapi.o
+
[PYTHON::python_dcerpc_security]
PRIVATE_DEPENDENCIES = PYTALLOC
diff --git a/source4/nbt_server/config.mk b/source4/nbt_server/config.mk
index cb2b47d15e..84e6b661bf 100644
--- a/source4/nbt_server/config.mk
+++ b/source4/nbt_server/config.mk
@@ -66,7 +66,7 @@ NBT_SERVER_OBJ_FILES = $(addprefix nbt_server/, \
[MODULE::service_nbtd]
INIT_FUNCTION = server_service_nbtd_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = NBT_SERVER process_model
service_nbtd_OBJ_FILES = \
diff --git a/source4/ntptr/ntptr_base.c b/source4/ntptr/ntptr_base.c
index 1165631b18..a7004be90b 100644
--- a/source4/ntptr/ntptr_base.c
+++ b/source4/ntptr/ntptr_base.c
@@ -24,7 +24,6 @@
#include "includes.h"
#include "ntptr/ntptr.h"
-#include "build.h"
#include "param/param.h"
/* the list of currently registered NTPTR backends */
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 8f574fa96b..3706cd172c 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -24,7 +24,6 @@
#include "includes.h"
#include "lib/util/dlinklist.h"
-#include "build.h"
#include "ntvfs/ntvfs.h"
#include "param/param.h"
diff --git a/source4/ntvfs/sysdep/config.mk b/source4/ntvfs/sysdep/config.mk
index de445bff7b..68be660049 100644
--- a/source4/ntvfs/sysdep/config.mk
+++ b/source4/ntvfs/sysdep/config.mk
@@ -16,8 +16,7 @@ sys_notify_inotify_OBJ_FILES = ntvfs/sysdep/inotify.o
sys_notify_OBJ_FILES = ntvfs/sysdep/sys_notify.o
-[MODULE::sys_lease_linux]
-SUBSYSTEM = sys_lease
+[SUBSYSTEM::sys_lease_linux]
sys_lease_linux_OBJ_FILES = ntvfs/sysdep/sys_lease_linux.o
diff --git a/source4/ntvfs/sysdep/sys_notify.c b/source4/ntvfs/sysdep/sys_notify.c
index 22b72c4d63..9770323c3f 100644
--- a/source4/ntvfs/sysdep/sys_notify.c
+++ b/source4/ntvfs/sysdep/sys_notify.c
@@ -28,7 +28,6 @@
#include "lib/events/events.h"
#include "lib/util/dlinklist.h"
#include "param/param.h"
-#include "build.h"
/* list of registered backends */
static struct sys_notify_backend *backends;
diff --git a/source4/param/config.mk b/source4/param/config.mk
index 42cb6f3c1c..3e6758db8a 100644
--- a/source4/param/config.mk
+++ b/source4/param/config.mk
@@ -10,6 +10,12 @@ LIBSAMBA-HOSTCONFIG_OBJ_FILES = param/loadparm.o \
param/util.o \
lib/version.o
+LIBSAMBA-CONFIG_OBJ_FILES = param/loadparm.o \
+ param/params.o \
+ param/generic.o \
+ param/util.o \
+ lib/version.o
+
PUBLIC_HEADERS += param/param.h
PC_FILES += param/samba-hostconfig.pc
diff --git a/source4/param/share.c b/source4/param/share.c
index f8ee468054..47aea55751 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -21,7 +21,6 @@
#include "includes.h"
#include "param/share.h"
-#include "build.h"
#include "param/param.h"
const char *share_string_option(struct share_config *scfg, const char *opt_name, const char *defval)
diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk
index 807853fa16..974d12c882 100644
--- a/source4/rpc_server/config.mk
+++ b/source4/rpc_server/config.mk
@@ -16,7 +16,7 @@ PUBLIC_HEADERS += rpc_server/common/common.h
# Start MODULE dcerpc_rpcecho
[MODULE::dcerpc_rpcecho]
INIT_FUNCTION = dcerpc_server_rpcecho_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = NDR_ECHO
# End MODULE dcerpc_rpcecho
################################################
@@ -27,7 +27,7 @@ dcerpc_rpcecho_OBJ_FILES = rpc_server/echo/rpc_echo.o
# Start MODULE dcerpc_epmapper
[MODULE::dcerpc_epmapper]
INIT_FUNCTION = dcerpc_server_epmapper_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = NDR_EPMAPPER
# End MODULE dcerpc_epmapper
################################################
@@ -38,7 +38,7 @@ dcerpc_epmapper_OBJ_FILES = rpc_server/epmapper/rpc_epmapper.o
# Start MODULE dcerpc_remote
[MODULE::dcerpc_remote]
INIT_FUNCTION = dcerpc_server_remote_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
LIBCLI_SMB NDR_TABLE
# End MODULE dcerpc_remote
@@ -51,7 +51,7 @@ dcerpc_remote_OBJ_FILES = rpc_server/remote/dcesrv_remote.o
[MODULE::dcerpc_srvsvc]
INIT_FUNCTION = dcerpc_server_srvsvc_init
PRIVATE_PROTO_HEADER = srvsvc/proto.h
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON NDR_SRVSVC share
# End MODULE dcerpc_srvsvc
@@ -63,7 +63,7 @@ dcerpc_srvsvc_OBJ_FILES = $(addprefix rpc_server/srvsvc/, dcesrv_srvsvc.o srvsvc
# Start MODULE dcerpc_wkssvc
[MODULE::dcerpc_wkssvc]
INIT_FUNCTION = dcerpc_server_wkssvc_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON NDR_WKSSVC
# End MODULE dcerpc_wkssvc
@@ -75,7 +75,7 @@ dcerpc_wkssvc_OBJ_FILES = rpc_server/wkssvc/dcesrv_wkssvc.o
# Start MODULE dcerpc_unixinfo
[MODULE::dcerpc_unixinfo]
INIT_FUNCTION = dcerpc_server_unixinfo_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
SAMDB \
@@ -92,7 +92,7 @@ dcerpc_unixinfo_OBJ_FILES = rpc_server/unixinfo/dcesrv_unixinfo.o
[MODULE::dcesrv_samr]
INIT_FUNCTION = dcerpc_server_samr_init
PRIVATE_PROTO_HEADER = samr/proto.h
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
SAMDB \
DCERPC_COMMON \
@@ -106,7 +106,7 @@ dcesrv_samr_OBJ_FILES = $(addprefix rpc_server/samr/, dcesrv_samr.o samr_passwor
# Start MODULE dcerpc_winreg
[MODULE::dcerpc_winreg]
INIT_FUNCTION = dcerpc_server_winreg_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
OUTPUT_TYPE = MERGED_OBJ
PRIVATE_DEPENDENCIES = \
registry NDR_WINREG
@@ -119,7 +119,7 @@ dcerpc_winreg_OBJ_FILES = rpc_server/winreg/rpc_winreg.o
# Start MODULE dcerpc_netlogon
[MODULE::dcerpc_netlogon]
INIT_FUNCTION = dcerpc_server_netlogon_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
SCHANNELDB \
@@ -134,7 +134,7 @@ dcerpc_netlogon_OBJ_FILES = rpc_server/netlogon/dcerpc_netlogon.o
# Start MODULE dcerpc_lsa
[MODULE::dcerpc_lsarpc]
INIT_FUNCTION = dcerpc_server_lsa_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_PROTO_HEADER= lsa/proto.h
PRIVATE_DEPENDENCIES = \
SAMDB \
@@ -152,7 +152,7 @@ dcerpc_lsarpc_OBJ_FILES = $(addprefix rpc_server/lsa/, dcesrv_lsa.o lsa_init.o l
# Start MODULE dcerpc_spoolss
[MODULE::dcerpc_spoolss]
INIT_FUNCTION = dcerpc_server_spoolss_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
OUTPUT_TYPE = MERGED_OBJ
PRIVATE_DEPENDENCIES = \
DCERPC_COMMON \
@@ -168,7 +168,7 @@ dcerpc_spoolss_OBJ_FILES = rpc_server/spoolss/dcesrv_spoolss.o
# Start MODULE dcerpc_drsuapi
[MODULE::dcerpc_drsuapi]
INIT_FUNCTION = dcerpc_server_drsuapi_init
-SUBSYSTEM = dcerpc_server
+SUBSYSTEM = DCESRV
PRIVATE_DEPENDENCIES = \
SAMDB \
DCERPC_COMMON \
@@ -200,7 +200,7 @@ PUBLIC_HEADERS += rpc_server/dcerpc_server.h
[MODULE::DCESRV]
INIT_FUNCTION = server_service_rpc_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_DEPENDENCIES = dcerpc_server
DCESRV_OBJ_FILES = rpc_server/service_rpc.o
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index beb795ea22..1962a97d5b 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -34,7 +34,6 @@
#include "smbd/service.h"
#include "system/filesys.h"
#include "libcli/security/security.h"
-#include "build.h"
#include "param/param.h"
extern const struct dcesrv_interface dcesrv_mgmt_interface;
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index 27f3fe41c2..00f0d261ca 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -37,7 +37,6 @@
#include "lib/messaging/irpc.h"
#include "system/network.h"
#include "lib/socket/netif.h"
-#include "build.h"
#include "param/param.h"
struct dcesrv_socket_context {
@@ -471,7 +470,7 @@ NTSTATUS server_service_rpc_init(void)
extern NTSTATUS dcerpc_server_samr_init(void);
extern NTSTATUS dcerpc_server_remote_init(void);
extern NTSTATUS dcerpc_server_lsa_init(void);
- init_module_fn static_init[] = { STATIC_dcerpc_server_MODULES };
+ init_module_fn static_init[] = { STATIC_DCESRV_MODULES };
init_module_fn *shared_init = load_samba_modules(NULL, global_loadparm, "dcerpc_server");
run_init_functions(static_init);
diff --git a/source4/scripting/ejs/config.mk b/source4/scripting/ejs/config.mk
index cadd71673c..896b292e23 100644
--- a/source4/scripting/ejs/config.mk
+++ b/source4/scripting/ejs/config.mk
@@ -58,7 +58,9 @@ smbcalls_data_OBJ_FILES = scripting/ejs/smbcalls_data.o
OUTPUT_TYPE = MERGED_OBJ
SUBSYSTEM = smbcalls
INIT_FUNCTION = smb_setup_ejs_auth
-PRIVATE_DEPENDENCIES = auth
+PRIVATE_DEPENDENCIES = service_auth
+
+smbcalls_auth_OBJ_FILES = scripting/ejs/smbcalls_auth.o
smbcalls_auth_OBJ_FILES = scripting/ejs/smbcalls_auth.o
diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c
index b1a2f6a37b..98d6be07bf 100644
--- a/source4/scripting/ejs/smbcalls.c
+++ b/source4/scripting/ejs/smbcalls.c
@@ -23,7 +23,6 @@
#include "includes.h"
#include "param/param.h"
#include "scripting/ejs/smbcalls.h"
-#include "build.h"
#include "version.h"
/*
diff --git a/source4/scripting/python/config.mk b/source4/scripting/python/config.mk
index 59f628fe18..15be4ca309 100644
--- a/source4/scripting/python/config.mk
+++ b/source4/scripting/python/config.mk
@@ -20,7 +20,9 @@ SWIG_FILE = misc.i
python_misc_OBJ_FILES = scripting/python/misc_wrap.o
-PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py bin/python/registry.py bin/python/tdb.py bin/python/security.py bin/python/events.py bin/python/net.py
+_PY_FILES = $(shell find scripting/python -name "*.py")
+
+$(foreach pyfile, $(_PY_FILES),$(eval $(call python_py_module_template,$(patsubst scripting/python/%,%,$(pyfile)),$(pyfile))))
installpython:: pythonmods
@$(SHELL) $(srcdir)/script/installpython.sh \
diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c
index 6cd975c1a9..cbff14c708 100644
--- a/source4/scripting/python/modules.c
+++ b/source4/scripting/python/modules.c
@@ -19,7 +19,6 @@
#include "includes.h"
#include <Python.h>
-#include "build.h"
extern void init_ldb(void);
extern void init_security(void);
diff --git a/source4/smb_server/config.mk b/source4/smb_server/config.mk
index 8b6ae308f9..1e3da1fab6 100644
--- a/source4/smb_server/config.mk
+++ b/source4/smb_server/config.mk
@@ -2,7 +2,7 @@
#
[MODULE::SERVICE_SMB]
INIT_FUNCTION = server_service_smb_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = service_smb_proto.h
PRIVATE_DEPENDENCIES = SMB_SERVER
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 2cb551a520..e631975b37 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -20,7 +20,6 @@
#include "includes.h"
#include "smbd/process_model.h"
-#include "build.h"
#include "param/param.h"
/*
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 3f6cb48013..e1ebd133ce 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -28,7 +28,6 @@
#include "lib/cmdline/popt_common.h"
#include "system/dir.h"
#include "system/filesys.h"
-#include "build.h"
#include "ldb/include/ldb.h"
#include "registry/registry.h"
#include "ntvfs/ntvfs.h"
@@ -199,7 +198,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
extern NTSTATUS server_service_smb_init(void);
extern NTSTATUS server_service_drepl_init(void);
extern NTSTATUS server_service_rpc_init(void);
- init_module_fn static_init[] = { STATIC_service_MODULES };
+ init_module_fn static_init[] = { STATIC_smbd_MODULES };
init_module_fn *shared_init;
struct event_context *event_ctx;
NTSTATUS status;
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 01a55a67f6..5c5f96c505 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -31,7 +31,6 @@
#include "dynconfig.h"
#include "torture/torture.h"
-#include "build.h"
#include "lib/util/dlinklist.h"
#include "librpc/rpc/dcerpc.h"
#include "param/param.h"
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 8a41b72249..39d85e0572 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -21,7 +21,6 @@
#include "includes.h"
#include "system/time.h"
#include "torture/torture.h"
-#include "build.h"
#include "lib/util/dlinklist.h"
#include "param/param.h"
#include "lib/cmdline/popt_common.h"
diff --git a/source4/web_server/config.mk b/source4/web_server/config.mk
index e218aa8ddc..86ad04fb7e 100644
--- a/source4/web_server/config.mk
+++ b/source4/web_server/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM WEB
[MODULE::WEB]
INIT_FUNCTION = server_service_web_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = proto.h
PRIVATE_DEPENDENCIES = ESP LIBTLS smbcalls process_model
# End SUBSYSTEM WEB
diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk
index 3165fc2d21..3c5b740e68 100644
--- a/source4/winbind/config.mk
+++ b/source4/winbind/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM WINBIND
[MODULE::WINBIND]
INIT_FUNCTION = server_service_winbind_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = wb_proto.h
PRIVATE_DEPENDENCIES = \
WB_HELPER \
diff --git a/source4/wrepl_server/config.mk b/source4/wrepl_server/config.mk
index e339d223aa..6428a353b1 100644
--- a/source4/wrepl_server/config.mk
+++ b/source4/wrepl_server/config.mk
@@ -4,7 +4,7 @@
# Start SUBSYSTEM WREPL_SRV
[MODULE::WREPL_SRV]
INIT_FUNCTION = server_service_wrepl_init
-SUBSYSTEM = service
+SUBSYSTEM = smbd
PRIVATE_PROTO_HEADER = wrepl_server_proto.h
PRIVATE_DEPENDENCIES = \
LIBCLI_WREPL WINSDB process_model