diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/Makefile | 2 | ||||
-rw-r--r-- | source4/auth/auth.c | 1 | ||||
-rw-r--r-- | source4/auth/gensec/gensec.c | 1 | ||||
-rw-r--r-- | source4/build/smb_build/header.pm | 86 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 2 | ||||
-rw-r--r-- | source4/build/smb_build/main.pl | 24 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 186 | ||||
-rw-r--r-- | source4/lib/events/events.c | 6 | ||||
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 2 | ||||
-rw-r--r-- | source4/lib/registry/interface.c | 1 | ||||
-rw-r--r-- | source4/lib/registry/local.c | 1 | ||||
-rw-r--r-- | source4/rules.mk | 7 | ||||
-rw-r--r-- | source4/scripting/ejs/smbcalls.c | 1 | ||||
-rw-r--r-- | source4/scripting/python/config.mk | 4 |
15 files changed, 84 insertions, 241 deletions
diff --git a/source4/Makefile b/source4/Makefile index a2f0afc5f1..ea98b5e469 100644 --- a/source4/Makefile +++ b/source4/Makefile @@ -29,7 +29,7 @@ DEFAULT_HEADERS = $(srcdir)/lib/util/dlinklist.h \ binaries:: libraries:: $(STATIC_LIBS) $(SHARED_LIBS) -modules:: $(SHARED_MODULES) +modules:: $(PLUGINS) headers:: $(PUBLIC_HEADERS) $(DEFAULT_HEADERS) manpages:: $(MANPAGES) all:: showflags $(ALL_PREDEP) bin/asn1_compile bin/compile_et binaries modules pythonmods diff --git a/source4/auth/auth.c b/source4/auth/auth.c index ed590f2ced..b4c4b8ee72 100644 --- a/source4/auth/auth.c +++ b/source4/auth/auth.c @@ -22,7 +22,6 @@ #include "lib/util/dlinklist.h" #include "auth/auth.h" #include "lib/events/events.h" -#include "build.h" #include "param/param.h" /*************************************************************************** diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c index cd2066d9fd..2462fa0450 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/smb_build/header.pm b/source4/build/smb_build/header.pm deleted file mode 100644 index 93240f1d17..0000000000 --- a/source4/build/smb_build/header.pm +++ /dev/null @@ -1,86 +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"; - unless (/{/) { - my $fn = $key->{INIT_FUNCTION_TYPE}; - $fn =~ s/\(\*\)/$_/; - $output .= "$fn;\n"; - } - } - - $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/input.pm b/source4/build/smb_build/input.pm index ed584e185c..9c7ffc850e 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -198,7 +198,6 @@ sub import_integrated($$) next if($mod->{SUBSYSTEM} ne $lib->{NAME}); next if($mod->{ENABLE} ne "YES"); - push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{NAME}_OBJ_LIST)"); push (@{$lib->{LINK_FLAGS}}, "\$($mod->{NAME}_LINK_FLAGS)"); push (@{$lib->{CFLAGS}}, @{$mod->{CFLAGS}}) if defined($mod->{CFLAGS}); push (@{$lib->{PUBLIC_DEPENDENCIES}}, @{$mod->{PUBLIC_DEPENDENCIES}}) if defined($mod->{PUBLIC_DEPENDENCIES}); @@ -273,7 +272,6 @@ sub check($$$$$) foreach my $part (values %$INPUT) { $part->{LINK_FLAGS} = []; - $part->{FULL_OBJ_LIST} = ["\$($part->{NAME}_OBJ_LIST)"]; if ($part->{TYPE} eq "SUBSYSTEM") { check_subsystem($INPUT, $part, $subsys_ot); diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index 46a092d69f..0717cd9b0b 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; @@ -49,21 +48,15 @@ $config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type; $config::config{MODULE_OUTPUT_TYPE} = $module_output_type; my $mkenv = new smb_build::makefile(\%config::config, $mkfile); -foreach my $key (values %$OUTPUT) { - next unless defined $key->{OUTPUT_TYPE}; - - $mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}}); -} - my $shared_libs_used = 0; 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->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}}); if (defined($key->{PC_FILE})) { - push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}"); + $mkenv->output("PC_FILES += $key->{BASEDIR}/$key->{PC_FILE}\n"); } $mkenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}}); @@ -77,23 +70,30 @@ foreach my $key (values %$OUTPUT) { $mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES}); $mkenv->Manpage($key) if defined($key->{MANPAGE}); $mkenv->Header($key) if defined($key->{PUBLIC_HEADERS}); - $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or - defined($key->{PUBLIC_PROTO_HEADER}); } foreach my $key (values %$OUTPUT) { next unless defined $key->{OUTPUT_TYPE}; + $mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}}); +} + +foreach my $key (values %$OUTPUT) { + next unless defined $key->{OUTPUT_TYPE}; + + $mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}}); $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->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}}); + $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or + defined($key->{PUBLIC_PROTO_HEADER}); + $mkenv->InitFunctions($key) if defined($key->{INIT_FUNCTIONS}); } $mkenv->write("data.mk"); -header::create_smb_build_h($OUTPUT, "include/build.h"); cflags::create_cflags($OUTPUT, $config::config{srcdir}, $config::config{builddir}, "extra_cflags.txt"); diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 16b46ed343..072e3c0c4b 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -21,18 +21,6 @@ sub new($$$) bless($self, $myname); - $self->{manpages} = []; - $self->{sbin_progs} = []; - $self->{bin_progs} = []; - $self->{static_libs} = []; - $self->{python_dsos} = []; - $self->{python_pys} = []; - $self->{shared_libs} = []; - $self->{headers} = []; - $self->{shared_modules} = []; - $self->{plugins} = []; - $self->{pc_files} = []; - $self->{proto_headers} = []; $self->{output} = ""; $self->{mkfile} = $mkfile; @@ -100,14 +88,12 @@ sub array2oneperline($) return $output; } -sub _prepare_list_ex($$$$$) +sub _prepare_list($$$) { - my ($self,$ctx,$var,$pre,$post) = @_; + my ($self,$ctx,$var) = @_; my @tmparr = (); - push(@tmparr, $pre) if defined($pre); push(@tmparr, @{$ctx->{$var}}) if defined($ctx->{$var}); - push(@tmparr, $post) if defined($post); my $tmplist = array2oneperline(\@tmparr); return if ($tmplist eq ""); @@ -115,18 +101,17 @@ sub _prepare_list_ex($$$$$) $self->output("$ctx->{NAME}_$var =$tmplist\n"); } -sub _prepare_list($$$) -{ - my ($self,$ctx,$var) = @_; - - $self->_prepare_list_ex($ctx, $var, undef, undef); -} - sub Integrated($$) { my ($self,$ctx) = @_; $self->_prepare_list($ctx, "OBJ_LIST"); + $self->output("$ctx->{SUBSYSTEM}_OBJ_LIST += \$($ctx->{NAME}_OBJ_LIST)\n"); + if(defined($ctx->{INIT_FUNCTION})) { + my $init_fn = $ctx->{INIT_FUNCTION}; + $init_fn =~ s/"/\\\"/g; + $self->output("$ctx->{SUBSYSTEM}_INIT_FUNCTIONS += \"$init_fn,\"\n"); + } } sub SharedModulePrimitives($$) @@ -140,24 +125,19 @@ sub SharedModule($$) { my ($self,$ctx) = @_; - my $init_obj = ""; - my $sane_subsystem = lc($ctx->{SUBSYSTEM}); $sane_subsystem =~ s/^lib//; if ($ctx->{TYPE} eq "PYTHON") { - push (@{$self->{python_dsos}}, - "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}"); + $self->output("PYTHON_DSOS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n"); } else { - push (@{$self->{shared_modules}}, "$ctx->{TARGET_SHARED_LIBRARY}"); - push (@{$self->{plugins}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}"); + $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"); } } @@ -175,48 +155,26 @@ sub SharedModule($$) $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); - push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)"); - if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON") { - 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"; + $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-D$ctx->{INIT_FUNCTION}=init_module\n"); } $self->output(<< "__EOD__" -# -$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) $init_obj +$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) \@echo Linking \$\@ - \@mkdir -p $ctx->{SHAREDDIR} + \@mkdir -p \$(\@D) \@\$(MDLD) \$(MDLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ - \$($ctx->{NAME}\_FULL_OBJ_LIST) $init_obj \\ + \$($ctx->{NAME}\_OBJ_LIST) \\ \$($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"); } } @@ -233,7 +191,6 @@ sub SharedLibraryPrimitives($$) if (not grep(/STATIC_LIBRARY/, @{$ctx->{OUTPUT_TYPE}})) { $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); } } @@ -241,40 +198,28 @@ sub SharedLibrary($$) { my ($self,$ctx) = @_; - push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); + $self->output("SHARED_LIBS += $ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}\n") if (defined($ctx->{SO_VERSION})); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); -# $self->_prepare_list_ex($ctx, "LINK_FLAGS", "-Wl,--whole-archive", "-Wl,--no-whole-archive"); - - push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)"); - - my $soarg = ""; - my $lns = ""; - if ($self->{config}->{SONAMEFLAG} ne "#" and defined($ctx->{LIBRARY_SONAME})) { - $soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME}"; - if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { - $lns .= "\n\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}"; - } - } - - if (defined($ctx->{LIBRARY_SONAME})) { - $lns .= "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_DEBUGNAME}"; - } $self->output(<< "__EOD__" -# -$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) +$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ - \$($ctx->{NAME}\_FULL_OBJ_LIST) \\ + \$($ctx->{NAME}\_OBJ_LIST) \\ \$($ctx->{NAME}_LINK_FLAGS) \\ - $soarg$lns + \$(if \$(SONAMEFLAG), \$(SONAMEFLAG)$ctx->{LIBRARY_SONAME}) __EOD__ ); - $self->output("\n"); + if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { + $self->output("\t\@test \$($ctx->{NAME}_VERSION) = \$($ctx->{NAME}_SOVERSION) || ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{SHAREDDIR}/$ctx->{LIBRARY_SONAME}\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"); } sub MergedObj($$) @@ -296,70 +241,66 @@ __EOD__ ); } -sub StaticLibrary($$) +sub StaticLibraryPrimitives($$) { my ($self,$ctx) = @_; return unless (defined($ctx->{OBJ_FILES})); - push (@{$self->{static_libs}}, $ctx->{TARGET_STATIC_LIBRARY}) if ($ctx->{TYPE} eq "LIBRARY"); - - $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); +} - push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)"); +sub InitFunctions($$) +{ + my ($self, $ctx) = @_; + $self->output("\$($ctx->{NAME}_OBJ_LIST): CFLAGS+=-DSTATIC_$ctx->{NAME}_MODULES=\"\$($ctx->{NAME}_INIT_FUNCTIONS)$ctx->{INIT_FUNCTION_SENTINEL}\"\n"); +} - $self->output(<< "__EOD__" -# -$ctx->{TARGET_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST) - \@echo Linking \$@ - \@rm -f \$@ - \@mkdir -p $ctx->{STATICDIR} - \@\$(STLD) \$(STLD_FLAGS) \$@ \$($ctx->{NAME}_FULL_OBJ_LIST) +sub StaticLibrary($$) +{ + my ($self,$ctx) = @_; -__EOD__ -); + return unless (defined($ctx->{OBJ_FILES})); + + $self->output("STATIC_LIBS += $ctx->{TARGET_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY"); + $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); + $self->output("$ctx->{TARGET_STATIC_LIBRARY}: \$($ctx->{NAME}_OBJ_LIST)\n"); } sub Header($$) { my ($self,$ctx) = @_; + return if ($#{$ctx->{PUBLIC_HEADERS}} == -1); + + $self->output("PUBLIC_HEADERS +="); + foreach (@{$ctx->{PUBLIC_HEADERS}}) { - push (@{$self->{headers}}, output::add_dir_str($ctx->{BASEDIR}, $_)); + $self->output(" " . output::add_dir_str($ctx->{BASEDIR}, $_)); } + + $self->output("\n"); } sub Binary($$) { my ($self,$ctx) = @_; - my $installdir; - my $extradir = ""; - - my $localdir = "bin$extradir"; - - $installdir = "bin$extradir"; - - push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)"); - unless (defined($ctx->{INSTALLDIR})) { } elsif ($ctx->{INSTALLDIR} eq "SBINDIR") { - push (@{$self->{sbin_progs}}, "$installdir/$ctx->{BINARY}"); + $self->output("SBIN_PROGS += bin/$ctx->{BINARY}\n"); } elsif ($ctx->{INSTALLDIR} eq "BINDIR") { - push (@{$self->{bin_progs}}, "$installdir/$ctx->{BINARY}"); + $self->output("BIN_PROGS += bin/$ctx->{BINARY}\n"); } - $self->output("binaries:: $localdir/$ctx->{BINARY}\n"); + $self->output("binaries:: bin/$ctx->{BINARY}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); $self->output(<< "__EOD__" -$installdir/$ctx->{BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) +bin/$ctx->{BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) \@echo Linking \$\@ __EOD__ ); @@ -387,10 +328,8 @@ sub PythonFiles($$) foreach (@{$ctx->{PYTHON_FILES}}) { my $target = "bin/python/".basename($_); my $source = output::add_dir_str($ctx->{BASEDIR}, $_); - $self->output("$target: $source\n" . - "\tmkdir -p \$(builddir)/bin/python\n" . - "\tcp $source \$@\n\n"); - push (@{$self->{python_pys}}, $target); + $self->output("$target: $source\n\n"); + $self->output("PYTHON_PYS += $target\n"); } } @@ -398,8 +337,7 @@ sub Manpage($$) { my ($self,$ctx) = @_; - my $path = output::add_dir_str($ctx->{BASEDIR}, $ctx->{MANPAGE}); - push (@{$self->{manpages}}, $path); + $self->output("MANPAGES += " . output::add_dir_str($ctx->{BASEDIR}, $ctx->{MANPAGE}) . "\n"); } sub ProtoHeader($$) @@ -420,7 +358,7 @@ sub ProtoHeader($$) $comment .= " and "; $target.= " "; } - push (@{$self->{proto_headers}}, $priv); + $self->output("PROTO_HEADERS += $priv\n"); } else { $ctx->{PRIVATE_PROTO_HEADER} = $ctx->{PUBLIC_PROTO_HEADER}; $priv = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PRIVATE_PROTO_HEADER}); @@ -430,7 +368,7 @@ sub ProtoHeader($$) $pub = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PUBLIC_PROTO_HEADER}); $comment .= $pub; $target .= $pub; - push (@{$self->{proto_headers}}, $pub); + $self->output("PROTO_HEADERS += $pub\n"); } else { $ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER}; $pub = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PUBLIC_PROTO_HEADER}); @@ -445,20 +383,6 @@ sub write($$) { my ($self, $file) = @_; - $self->output("MANPAGES = " . array2oneperline($self->{manpages})."\n"); - $self->output("BIN_PROGS = " . array2oneperline($self->{bin_progs}) . "\n"); - $self->output("SBIN_PROGS = " . array2oneperline($self->{sbin_progs}) . "\n"); - $self->output("STATIC_LIBS = " . array2oneperline($self->{static_libs}) . "\n"); - $self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n"); - $self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n"); - $self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n"); - $self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n"); - $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n"); - $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n"); - $self->output("PROTO_HEADERS = " . array2oneperline($self->{proto_headers}) . "\n"); - $self->output("SHARED_MODULES = " . array2oneperline($self->{shared_modules}) . "\n"); - $self->output("PLUGINS = " . array2oneperline($self->{plugins}) . "\n"); - $self->_prepare_mk_files(); $self->output($self->{mkfile}); diff --git a/source4/lib/events/events.c b/source4/lib/events/events.c index 555a5092cc..969abeae46 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; @@ -102,6 +99,9 @@ void event_set_default_backend(const char *backend) static void event_backend_init(void) { #if _SAMBA_BUILD_ + NTSTATUS s4_events_standard_init(void); + NTSTATUS s4_events_select_init(void); + NTSTATUS s4_events_epoll_init(void); init_module_fn static_init[] = { STATIC_LIBEVENTS_MODULES }; if (event_backends) return; run_init_functions(static_init); diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 18070bdb86..a3bf71d0d8 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/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index d9f2defdc9..61d5f5148a 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -173,6 +173,7 @@ int ldb_should_b64_encode(const struct ldb_val *val); int ldb_objectclass_init(void); int ldb_operational_init(void); int ldb_paged_results_init(void); +int ldb_paged_searches_init(void); int ldb_rdn_name_init(void); int ldb_schema_init(void); int ldb_asq_init(void); @@ -180,6 +181,7 @@ int ldb_sort_init(void); int ldb_ldap_init(void); int ldb_ildap_init(void); int ldb_tdb_init(void); +int ldb_skel_init(void); int ldb_sqlite3_init(void); int ldb_match_msg(struct ldb_context *ldb, 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 3e463100c9..b2cdec9cdf 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/rules.mk b/source4/rules.mk index 4e7841fa93..506d4c0431 100644 --- a/source4/rules.mk +++ b/source4/rules.mk @@ -100,6 +100,13 @@ check:: test unused_macros: $(srcdir)/script/find_unused_macros.pl `find . -name "*.[ch]"` | sort +# Create a static library +%.a: + @echo Linking $@ + @rm -f $@ + @mkdir -p $(@D) + @$(STLD) $(STLD_FLAGS) $@ $^ + ############################################################################### # File types ############################################################################### diff --git a/source4/scripting/ejs/smbcalls.c b/source4/scripting/ejs/smbcalls.c index 1f29fce002..da35a6ba8c 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 b15e1fcda7..16cd301aad 100644 --- a/source4/scripting/python/config.mk +++ b/source4/scripting/python/config.mk @@ -35,6 +35,10 @@ PYDOCTOR_MODULES=bin/python/ldb.py bin/python/auth.py bin/python/credentials.py pydoctor:: pythonmods LD_LIBRARY_PATH=bin/shared PYTHONPATH=bin/python pydoctor --project-name=Samba --make-html --docformat=restructuredtext --add-package scripting/python/samba/ $(addprefix --add-module , $(PYDOCTOR_MODULES)) +bin/python/%.py: + mkdir -p $(@D) + cp $< $@ + installpython:: pythonmods @$(SHELL) $(srcdir)/script/installpython.sh \ $(INSTALLPERMS) \ |