Move responsibilities of build.h to makefile.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 16 Feb 2008 17:38:02 +0000 (18:38 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 16 Feb 2008 17:38:02 +0000 (18:38 +0100)
(This used to be commit a43f6d37bce85748e9cf2675e5beced5db26f1c3)

source4/auth/auth.c
source4/auth/gensec/gensec.c
source4/build/smb_build/header.pm [deleted file]
source4/build/smb_build/main.pl
source4/build/smb_build/makefile.pm
source4/lib/events/events.c
source4/lib/ldb/common/ldb_modules.c
source4/lib/ldb/include/ldb_private.h
source4/lib/registry/interface.c
source4/lib/registry/local.c
source4/scripting/ejs/smbcalls.c

index ed590f2ced520b974e9de772940de055bc882924..b4c4b8ee7245b597d31272273e0f6213097a9e51 100644 (file)
@@ -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"
 
 /***************************************************************************
index cd2066d9fd5f93044fa92e68497a9794350410f0..2462fa04507308647364919ec11a6becacefd08f 100644 (file)
@@ -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 (file)
index 93240f1..0000000
+++ /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;
index d00c864f5022c595cde32caffa381e1cf9df6935..c7a92b7ce16535ced96f511cf2b2d039e62b4b1a 100644 (file)
@@ -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;
@@ -89,10 +88,10 @@ foreach my $key (values %$OUTPUT) {
        $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");
index 15e428a2b9c4d293ef67253912bfceed95eb2c71..fdfdc79b10ff03c29888b1eb751aa0657a05caee 100644 (file)
@@ -116,6 +116,7 @@ sub Integrated($$)
 
        $self->_prepare_list($ctx, "OBJ_LIST");
        $self->output("$ctx->{SUBSYSTEM}_OBJ_LIST += \$($ctx->{NAME}_OBJ_LIST)\n");
+       $self->output("$ctx->{SUBSYSTEM}_INIT_FUNCTIONS += \"$ctx->{INIT_FUNCTION},\"\n") if defined($ctx->{INIT_FUNCTION});
 }
 
 sub SharedModulePrimitives($$)
@@ -244,6 +245,12 @@ sub StaticLibraryPrimitives($$)
        $self->_prepare_list($ctx, "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");
+}
+
 sub StaticLibrary($$)
 {
        my ($self,$ctx) = @_;
index 555a5092cc219588da4269353e438a1044105a08..969abeae468e14aad13bc0d608322f2e1b2cd234 100644 (file)
@@ -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);
index 18070bdb8633ba10f253871992196292739fd003..a3bf71d0d8ab881400276292e1465aab8e668d6e 100644 (file)
@@ -35,7 +35,6 @@
 
 #if (_SAMBA_BUILD_ >= 4)
 #include "includes.h"
-#include "build.h"
 #endif
 
 #define LDB_MODULE_PREFIX      "modules:"
index d9f2defdc914931e3d12e0643ef7ec5b6faea8dc..61d5f5148a9c4e77df7c51779d9b4c1dbaffe957 100644 (file)
@@ -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,
index a18fd2c28c88fa61fc07cb66d5b941721c0d67fa..ff3ddf0a3599f08b8f04857e9a0e7c38b77f5de9 100644 (file)
@@ -21,7 +21,6 @@
 #include "lib/util/dlinklist.h"
 #include "lib/registry/registry.h"
 #include "system/filesys.h"
-#include "build.h"
 
 
 /**
index 3e463100c9cb80380f02066cfd3b6a45010f8c91..b2cdec9cdf1c1b144da38a898c3fbbefe082f5a9 100644 (file)
@@ -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;
index 1f29fce00249e6bd1e18c32a052a6198c5c3837a..da35a6ba8c0a21f11932abf7c4a77b99004624ac 100644 (file)
@@ -23,7 +23,6 @@
 #include "includes.h"
 #include "param/param.h"
 #include "scripting/ejs/smbcalls.h"
-#include "build.h"
 #include "version.h"
 
 /*