From 844acb226086e55de9a2442396a4e002471295e8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Mar 2010 20:12:16 +1100 Subject: build: waf quicktest nearly works Rewrote wafsamba using a new dependency handling system, and started adding the waf test code --- buildtools/compare_generated.sh | 44 +- buildtools/waf-svn | Bin 90898 -> 90557 bytes buildtools/wafsamba/README | 15 + buildtools/wafsamba/gccdeps.py | 108 ++++ buildtools/wafsamba/samba_asn1.py | 16 +- buildtools/wafsamba/samba_autoconf.py | 8 +- buildtools/wafsamba/samba_autoproto.py | 3 +- buildtools/wafsamba/samba_deps.py | 823 ++++++++++++++++++--------- buildtools/wafsamba/samba_errtable.py | 26 + buildtools/wafsamba/samba_patterns.py | 21 +- buildtools/wafsamba/samba_pidl.py | 13 +- buildtools/wafsamba/samba_python.py | 37 +- buildtools/wafsamba/samba_utils.py | 50 +- buildtools/wafsamba/wafsamba.py | 174 ++++-- lib/replace/wscript | 18 +- lib/subunit/python/wscript_build | 16 + libcli/nbt/wscript_build | 2 +- libcli/security/wscript_build | 2 +- nsswitch/wscript_build | 5 +- source4/Makefile.waf | 20 + source4/auth/gensec/wscript_build | 6 +- source4/auth/ntlm/wscript_build | 6 +- source4/auth/ntlmssp/wscript_build | 2 +- source4/auth/wscript_build | 2 +- source4/autogen-waf.sh | 10 + source4/client/wscript_build | 4 - source4/configure.waf | 9 + source4/dsdb/samdb/ldb_modules/wscript_build | 86 ++- source4/dsdb/wscript_build | 4 +- source4/heimdal_build/wscript_build | 100 ++-- source4/kdc/wscript_build | 11 +- source4/lib/ldb/wscript | 82 ++- source4/lib/registry/wscript_build | 2 +- source4/lib/smbreadline/wscript_build | 6 + source4/lib/smbreadline/wscript_configure | 12 + source4/lib/socket/wscript_build | 4 +- source4/libcli/security/wscript_build | 2 +- source4/libcli/wscript_build | 6 +- source4/librpc/wscript_build | 16 +- source4/nbt_server/wscript_build | 2 +- source4/ntvfs/posix/wscript_build | 8 +- source4/ntvfs/wscript_build | 4 +- source4/param/wscript_build | 6 +- source4/rpc_server/wscript_build | 6 +- source4/scripting/python/wscript_build | 8 +- source4/selftest/wscript | 6 +- source4/smb_server/wscript_build | 2 +- source4/smbd/wscript_build | 10 +- source4/torture/drs/wscript_build | 2 +- source4/torture/libnetapi/wscript_build | 2 +- source4/torture/libsmbclient/wscript_build | 2 +- source4/torture/local/wscript_build | 4 +- source4/torture/smb2/wscript_build | 2 +- source4/torture/winbind/wscript_build | 2 +- source4/torture/wscript_build | 42 +- source4/utils/net/wscript_build | 6 +- source4/utils/wscript_build | 3 +- source4/winbind/wscript_build | 2 +- source4/wscript | 6 +- source4/wscript_build | 20 +- 60 files changed, 1329 insertions(+), 587 deletions(-) create mode 100644 buildtools/wafsamba/gccdeps.py create mode 100644 buildtools/wafsamba/samba_errtable.py create mode 100644 lib/subunit/python/wscript_build create mode 100644 source4/Makefile.waf create mode 100755 source4/autogen-waf.sh create mode 100755 source4/configure.waf create mode 100644 source4/lib/smbreadline/wscript_build create mode 100644 source4/lib/smbreadline/wscript_configure diff --git a/buildtools/compare_generated.sh b/buildtools/compare_generated.sh index 98504a868a..ae20fef37d 100755 --- a/buildtools/compare_generated.sh +++ b/buildtools/compare_generated.sh @@ -2,13 +2,49 @@ # compare the generated files from a waf +old_build=$HOME/samba_old gen_files=$(cd bin/default && find . -type f -name '*.[ch]') +2>&1 + +strip_file() +{ + in_file=$1 + out_file=$2 + cat $in_file | + grep -v 'The following definitions come from' | + grep -v 'Automatically generated at' | + grep -v 'Generated from' | + sed 's|/home/tnagy/samba/source4||g' | + sed 's|/home/tnagy/samba/|../|g' | + sed 's|bin/default/source4/||g' | + sed 's|bin/default/|../|g' | + sed 's/define _____/define ___/g' | + sed 's/define __*/define _/g' | + sed 's/define _DEFAULT_/define _/g' | + sed 's/define _SOURCE4_/define ___/g' | + sed 's/define ___/define _/g' | + sed 's/ifndef ___/ifndef _/g' | + sed 's|endif /* ____|endif /* __|g' | + sed s/__DEFAULT_SOURCE4/__/ | + sed s/__DEFAULT_SOURCE4/__/ | + sed s/__DEFAULT/____/ > $out_file +} + +compare_file() +{ + f=$f + bname=$(basename $f) + t1=/tmp/$bname.old.$$ + t2=/tmp/$bname.new.$$ + strip_file $old_build/$f $t1 + strip_file bin/default/$f $t2 + diff -u -b $t1 $t2 2>&1 + rm -f $t1 $t2 +} + for f in $gen_files; do - echo - echo "===================================================" - echo "Comparing generated file $f" - diff -u -b $HOME/samba_old/$f bin/default/$f + compare_file $f done diff --git a/buildtools/waf-svn b/buildtools/waf-svn index 740082d654..0643c28f72 100755 Binary files a/buildtools/waf-svn and b/buildtools/waf-svn differ diff --git a/buildtools/wafsamba/README b/buildtools/wafsamba/README index d813e9ecea..028955c943 100644 --- a/buildtools/wafsamba/README +++ b/buildtools/wafsamba/README @@ -2,3 +2,18 @@ This is a set of waf 'tools' to help make building the Samba components easier, by having common functions in one place. This gives us a more consistent build, and ensures that our project rules are obeyed + + +TODO: + - fix deps for --target + - cache project rules calculation + - make pidl rules depend on full pidl sources + - make script rules depend on the scripts + - add waf test + - s3 build + - merged build + - etags + - rest of old make targets + - better Makefile waf wrapper + - + diff --git a/buildtools/wafsamba/gccdeps.py b/buildtools/wafsamba/gccdeps.py new file mode 100644 index 0000000000..bd03da4f8b --- /dev/null +++ b/buildtools/wafsamba/gccdeps.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python +# encoding: utf-8 +# Thomas Nagy, 2008-2010 (ita) + +""" +Execute the tasks with gcc -MD, read the dependencies from the .d file +and prepare the dependency calculation for the next run +""" + +import os, re, threading +import Task, Logs, Utils, preproc + +lock = threading.Lock() + + +def detect(conf): + conf.env.append_unique('CCFLAGS', '-MD') + +def scan(self): + "the scanner does not do anything initially" + nodes = self.generator.bld.node_deps.get(self.unique_id(), []) + names = [] + return (nodes, names) + +re_src = re.compile("^(\.\.)[\\/](.*)$") + +def post_run(self): + # The following code is executed by threads, it is not safe, so a lock is needed... + + if getattr(self, 'cached', None): + return Task.Task.post_run(self) + + name = self.outputs[0].abspath(self.env) + name = name.rstrip('.o') + '.d' + txt = Utils.readf(name) + #os.unlink(name) + + txt = txt.replace('\\\n', '') + + lst = txt.strip().split(':') + val = ":".join(lst[1:]) + val = val.split() + + nodes = [] + bld = self.generator.bld + + f = re.compile("^("+self.env.variant()+"|\.\.)[\\/](.*)$") + for x in val: + if os.path.isabs(x): + + if not preproc.go_absolute: + continue + + lock.acquire() + try: + node = bld.root.find_resource(x) + finally: + lock.release() + else: + g = re.search(re_src, x) + if g: + x = g.group(2) + lock.acquire() + try: + node = bld.bldnode.parent.find_resource(x) + finally: + lock.release() + else: + g = re.search(f, x) + if g: + x = g.group(2) + lock.acquire() + try: + node = bld.srcnode.find_resource(x) + finally: + lock.release() + + if id(node) == id(self.inputs[0]): + # ignore the source file, it is already in the dependencies + # this way, successful config tests may be retrieved from the cache + continue + + if not node: + raise ValueError('could not find %r for %r' % (x, self)) + else: + nodes.append(node) + + Logs.debug('deps: real scanner for %s returned %s' % (str(self), str(nodes))) + + bld.node_deps[self.unique_id()] = nodes + bld.raw_deps[self.unique_id()] = [] + + try: + del self.cache_sig + except: + pass + + Task.Task.post_run(self) + +for name in 'cc cxx'.split(): + try: + cls = Task.TaskBase.classes[name] + except KeyError: + pass + else: + cls.post_run = post_run + cls.scan = scan + diff --git a/buildtools/wafsamba/samba_asn1.py b/buildtools/wafsamba/samba_asn1.py index 27dc43931f..6b099062c7 100644 --- a/buildtools/wafsamba/samba_asn1.py +++ b/buildtools/wafsamba/samba_asn1.py @@ -1,7 +1,7 @@ # samba ASN1 rules -from TaskGen import taskgen, before -import Build, os, string, Utils +from TaskGen import before +import Build, os from samba_utils import * from samba_autoconf import * @@ -48,11 +48,16 @@ def SAMBA_ASN1(bld, name, source, # SRC[0].abspath(env) gives the absolute path to the source directory for the first # source file. Note that in the case of a option_file, we have more than # one source file + # SRC[1].abspath(env) gives the path of asn1_compile. This makes the asn1 output + # correctly depend on the compiler binary cd_rule = 'cd ${TGT[0].parent.abspath(env)}' - asn1_rule = cd_rule + ' && ${ASN1COMPILER} ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file ${SRC[0].abspath(env)} ${ASN1NAME}' + asn1_rule = cd_rule + ' && ${SRC[1].abspath(env)} ${OPTION_FILE} ${ASN1OPTIONS} --one-code-file ${SRC[0].abspath(env)} ${ASN1NAME}' + + source = TO_LIST(source) + source.append('asn1_compile') if option_file is not None: - source = [ source, option_file ] + source.append(option_file) t = bld(rule=asn1_rule, features = 'asn1', @@ -65,7 +70,6 @@ def SAMBA_ASN1(bld, name, source, t.env.ASN1NAME = asn1name t.env.ASN1OPTIONS = options - t.env.ASN1COMPILER = os.path.join(os.environ.get('PWD'), 'bin/asn1_compile') if option_file is not None: t.env.OPTION_FILE = "--option-file=%s" % os.path.normpath(os.path.join(bld.curdir, option_file)) @@ -99,7 +103,7 @@ def SAMBA_ASN1(bld, name, source, t = bld(features = 'cc', source = cfile, target = name, - ccflags = CURRENT_CFLAGS(bld, name, ''), + samba_cflags = CURRENT_CFLAGS(bld, name, ''), depends_on = '', samba_deps = TO_LIST('HEIMDAL_ROKEN'), samba_includes = includes, diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index f7519858cc..b3b9c09d33 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -1,10 +1,8 @@ # a waf tool to add autoconf-like macros to the configure section -import Build, os, Logs, sys, Configure, Options -import string, Task, Utils, optparse +import Build, os +import string from Configure import conf -from Logs import debug -from TaskGen import extension from samba_utils import * #################################################### @@ -208,7 +206,7 @@ def CHECK_CODE(conf, code, define, execute=execute, define_name = define, mandatory = mandatory, - ccflags=TO_LIST(cflags), + samba_cflags=TO_LIST(cflags), includes=includes, msg=msg): conf.DEFINE(define, 1) diff --git a/buildtools/wafsamba/samba_autoproto.py b/buildtools/wafsamba/samba_autoproto.py index 71274ead75..a6a5e28c49 100644 --- a/buildtools/wafsamba/samba_autoproto.py +++ b/buildtools/wafsamba/samba_autoproto.py @@ -1,7 +1,6 @@ # waf build tool for building automatic prototypes from C source -from TaskGen import taskgen, before -import Build, os, string, Utils +import Build from samba_utils import * # rule for heimdal prototype generation diff --git a/buildtools/wafsamba/samba_deps.py b/buildtools/wafsamba/samba_deps.py index 41b786d6bf..d6b68f7c64 100644 --- a/buildtools/wafsamba/samba_deps.py +++ b/buildtools/wafsamba/samba_deps.py @@ -1,7 +1,6 @@ -# Samba automatic dependency handling +# Samba automatic dependency handling and project rules -from TaskGen import taskgen, before -import Build, os, string, Utils, re +import Build, os, re, Environment from samba_utils import * from samba_autoconf import * @@ -30,156 +29,66 @@ def EXPAND_ALIAS(bld, target): Build.BuildContext.EXPAND_ALIAS = EXPAND_ALIAS -def expand_dependencies(bld, dep, chain, path): - '''expand a dependency recursively - return a triple of (uselib, uselib_local, add_objects) - ''' - - dep = EXPAND_ALIAS(bld, dep) - - t = bld.name_to_obj(dep, bld.env) - - # check for a cached list - if t is not None: - expanded = getattr(t, 'expanded_dependencies', None) - if expanded is not None: - return expanded - - target_dict = LOCAL_CACHE(bld, 'TARGET_TYPE') - - uselib_local = [] - uselib = [] - add_objects = [] - - recurse = False - - bld.ASSERT(dep in target_dict, "Dependency %s not found in %s" % (dep, path)) - type = target_dict[dep] - if type == 'SYSLIB': - uselib.append(dep) - elif type == 'LIBRARY': - uselib_local.append(dep) - recurse = True - elif type == 'SUBSYSTEM': - add_objects.append(dep) - recurse = True - elif type == 'MODULE': - add_objects.append(dep) - recurse = True - elif type == 'PYTHON': - add_objects.append(dep) - recurse = True - elif type == 'ASN1': - add_objects.append(dep) - recurse = True - elif type == 'BINARY': - pass - elif type == 'EMPTY': - pass - elif type == 'DISABLED': - debug('deps: Ignoring dependency on disabled target %s: %s' % (dep, path)) - else: - bld.ASSERT(False, "Unknown target type %s for %s" % (type, dep)) - - # for some types we have to build the list recursively - if recurse: - bld.ASSERT(t is not None, "Unable to find target %s" % dep) - rec_deps = getattr(t, 'samba_deps', None) - bld.ASSERT(rec_deps is not None, "Unable to find dependencies of target %s" % dep) - for d2 in rec_deps: - try: - bld.ASSERT(d2 not in chain, "Circular dependency for %s: %s->%s" % (dep, path, d2)) - except: - print "Removing dependency %s from target %s" % (d2, dep) - rec_deps.remove(d2) - continue - c2 = chain.copy() - c2[d2] = True - (rec_uselib, rec_uselib_local, - rec_add_objects) = expand_dependencies(bld, d2, c2, "%s->%s" % (path, d2)) - uselib.extend(rec_uselib) - uselib_local.extend(rec_uselib_local) - add_objects.extend(rec_add_objects) - - if t is not None: - t.expanded_dependencies = (uselib, uselib_local, add_objects) - - return (uselib, uselib_local, add_objects) - - -def expand_deplist(self): - '''return an expanded list of dependencies from the samba_deps attribute''' - - if not getattr(self, 'samba_deps', None): - return ([], [], []) - - bld = self.bld - deps = self.samba_deps - - uselib_local = [] - uselib = [] - add_objects = [] - - for d in deps: - (u, ul, ao) = expand_dependencies(bld, d, { self.name:True }, self.name) - uselib.extend(u) - uselib_local.extend(ul) - add_objects.extend(ao) +def expand_subsystem_deps(bld): + '''expand the reverse dependencies resulting from subsystem + attributes of modules''' + subsystems = LOCAL_CACHE(bld, 'INIT_FUNCTIONS') + aliases = LOCAL_CACHE(bld, 'TARGET_ALIAS') + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + + for s in subsystems: + if s in aliases: + s = aliases[s] + bld.ASSERT(s in targets, "Subsystem target %s not declared" % s) + type = targets[s] + if type == 'DISABLED' or type == 'EMPTY': + continue - return (uselib, uselib_local, add_objects) + t = bld.name_to_obj(s, bld.env) + bld.ASSERT(t is not None, "Subsystem target %s not found" % s) + for d in subsystems[s]: + type = targets[d['TARGET']] + if type != 'DISABLED' and type != 'EMPTY': + t.samba_deps_extended.append(d['TARGET']) + t2 = bld.name_to_obj(d['TARGET'], bld.env) + t2.samba_includes_extended.extend(t.samba_includes_extended) + t2.samba_deps_extended.extend(t.samba_deps_extended) + t.samba_deps_extended = unique_list(t.samba_deps_extended) -@feature('cc', 'cshlib', 'cprogram') -@before('apply_lib_vars', 'apply_verif', 'apply_objdeps', 'apply_obj_vars', 'apply_incpaths', 'build_includes') -@after('default_cc') def build_dependencies(self): '''This builds the dependency list for a target. It runs after all the targets are declared The reason this is not just done in the SAMBA_*() rules is that we have no way of knowing - the full dependency list for a target until we have all of the targets declared. So what we do is - add a samba_deps attribute on the task generator when we declare it, then - this rule runs after all the task generators are declared and maps the samba_deps attribute - to a set of uselib, uselib_local and add_objects dependencies + the full dependency list for a target until we have all of the targets declared. ''' - if getattr(self, 'build_dependencies_done', False): - return - self.build_dependencies_done = True - - if getattr(self, 'samba_deps', None) is None: - return - - target_dict = LOCAL_CACHE(self.bld, 'TARGET_TYPE') - # we only should add extra library and object deps on libraries and binaries - type = target_dict[self.name] - if type != 'LIBRARY' and type != 'BINARY': + if not self.samba_type in ['LIBRARY', 'BINARY', 'PYTHON']: return - (uselib, uselib_local, add_objects) = expand_deplist(self) + # we need to link against: - if 'GLOBAL_DEPENDENCIES' in self.bld.env: - add_objects.extend(self.bld.env.GLOBAL_DEPENDENCIES) + # 1) any direct system libs + # 2) any indirect system libs that come from subsystem dependencies + # 3) any direct local libs + # 4) any indirect local libs that come from subsystem dependencies + # 5) any direct objects + # 6) any indirect objects that come from subsystem dependencies - self.uselib = unique_list(uselib) - self.uselib_local = unique_list(uselib_local) - self.add_objects = unique_list(add_objects) + self.uselib = list(self.final_syslibs) + self.uselib_local = list(self.final_libs) + self.add_objects = list(self.final_objects) - debug('deps: dependency counts for %s: uselib=%u uselib_local=%u add_objects=%u' % ( - self.name, len(uselib), len(uselib_local), len(add_objects))) + debug('deps: computed dependencies for target %s: uselib=%s uselib_local=%s add_objects=%s', + self.sname, self.uselib, self.uselib_local, self.add_objects) -@feature('cc', 'cshlib', 'cprogram') -@before('apply_lib_vars', 'apply_verif', 'apply_objdeps', 'apply_obj_vars', 'apply_incpaths', 'add_init_functions') -@after('build_dependencies') def build_includes(self): '''This builds the right set of includes for a target. - This is closely related to building the set of dependencies, and - calls into the same expand_dependencies() function to do the work. - One tricky part of this is that the includes= attribute for a target needs to use paths which are relative to that targets declaration directory (which we can get at via t.path). @@ -191,82 +100,68 @@ def build_includes(self): attribute ''' - if not getattr(self, 'build_dependencies_done', False): - build_dependencies(self) - if getattr(self, 'build_includes_done', False): - return - self.build_includes_done = True - if getattr(self, 'samba_includes', None) is None: return bld = self.bld - (uselib, uselib_local, add_objects) = expand_deplist(self) - - # get the list of all dependencies - all_deps = [] -# all_deps.extend(uselib) - all_deps.extend(uselib_local) - all_deps.extend(add_objects) - all_deps = unique_list(all_deps) + inc_deps = self.includes_objects includes = [] - # build a list of includes + # maybe add local includes if getattr(self, 'local_include', True) == True and getattr(self, 'local_include_first', True): includes.append('.') - includes.extend(TO_LIST(self.samba_includes)) + includes.extend(self.samba_includes_extended) if 'EXTRA_INCLUDES' in bld.env: includes.extend(bld.env['EXTRA_INCLUDES']) includes.append('#') - mypath = self.path.abspath(bld.env) + inc_set = set() + inc_abs = [] - for d in all_deps: + for d in inc_deps: t = bld.name_to_obj(d, bld.env) - bld.ASSERT(t is not None, "Unable to find dependency %s for %s" % (d, self.name)) - t.samba_used = True - samba_includes = getattr(t, 'samba_includes', None) - inclist = TO_LIST(samba_includes) + bld.ASSERT(t is not None, "Unable to find dependency %s for %s" % (d, self.sname)) + inclist = getattr(t, 'samba_includes_extended', []) if getattr(t, 'local_include', True) == True: inclist.append('.') if inclist == []: continue - tpath = t.path.abspath(bld.env) - relpath = os.path.relpath(tpath, mypath) + tpath = t.samba_abspath for inc in inclist: - includes.append(os.path.normpath(os.path.join(relpath, inc))) + npath = tpath + '/' + inc + if not npath in inc_set: + inc_abs.append(npath) + inc_set.add(npath) + + mypath = self.path.abspath(bld.env) + for inc in inc_abs: + relpath = os_path_relpath(inc, mypath) + includes.append(relpath) if getattr(self, 'local_include', True) == True and not getattr(self, 'local_include_first', True): includes.append('.') self.includes = unique_list(includes) - debug('deps: Target %s has includes=%s all_deps=%s' % (self.name, self.includes, all_deps)) + debug('deps: includes for target %s: includes=%s', + self.sname, self.includes) + -@feature('cc', 'cshlib', 'cprogram') -@before('apply_lib_vars', 'apply_verif', 'apply_objdeps', 'apply_obj_vars', 'apply_incpaths') -@after('build_includes') def add_init_functions(self): '''This builds the right set of init functions''' - if not getattr(self, 'build_includes_done', False): - build_includes(self) - if getattr(self, 'add_init_functions_done', False): - return - self.add_init_functions_done = True - bld = self.bld subsystems = LOCAL_CACHE(bld, 'INIT_FUNCTIONS') modules = [] - if self.name in subsystems: - modules.append(self.name) + if self.sname in subsystems: + modules.append(self.sname) m = getattr(self, 'samba_modules', None) if m is not None: @@ -279,112 +174,530 @@ def add_init_functions(self): if modules == []: return - cflags = getattr(self, 'ccflags', []) + sentinal = getattr(self, 'init_function_sentinal', 'NULL') + + cflags = getattr(self, 'samba_cflags', [])[:] for m in modules: - if not m in subsystems: - print "subsystems: %s" % subsystems bld.ASSERT(m in subsystems, - "No init_function defined for module '%s' in target '%s'" % (m, self.name)) - cflags.append('-DSTATIC_%s_MODULES="%s"' % (m, ','.join(subsystems[m]))) + "No init_function defined for module '%s' in target '%s'" % (m, self.sname)) + init_fn_list = [] + for d in subsystems[m]: + init_fn_list.append(d['INIT_FUNCTION']) + cflags.append('-DSTATIC_%s_MODULES=%s' % (m, ','.join(init_fn_list) + ',' + sentinal)) self.ccflags = cflags -def check_orpaned_targets(bld): + +def check_duplicate_sources(bld, tgt_list): + '''see if we are compiling the same source file into multiple + subsystem targets for the same library or binary''' + + debug('deps: checking for duplicate sources') + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + + for t in tgt_list: + if not targets[t.sname] in [ 'LIBRARY', 'BINARY', 'PYTHON' ]: + continue + + sources = [] + for obj in t.add_objects: + t2 = t.bld.name_to_obj(obj, bld.env) + obj_sources = getattr(t2, 'source', '') + if obj_sources == '': continue + tpath = os_path_relpath(t2.path.abspath(bld.env), t.env['BUILD_DIRECTORY'] + '/default') + obj_sources = bld.SUBDIR(tpath, obj_sources) + sources.append( { 'dep':obj, 'src':set(TO_LIST(obj_sources)) } ) + #debug('deps: dependency expansion for target %s add_object %s: %s', + # t.sname, obj, obj_sources) + for s in sources: + for s2 in sources: + if s['dep'] == s2['dep']: continue + common = s['src'].intersection(s2['src']) + if common: + bld.ASSERT(False, + "Target %s has duplicate source files in %s and %s : %s" % (t.sname, + s['dep'], s2['dep'], + common)) + +def check_orpaned_targets(bld, tgt_list): '''check if any build targets are orphaned''' target_dict = LOCAL_CACHE(bld, 'TARGET_TYPE') - # make sure all the earlier functions have run - for t in bld.all_task_gen: - if not t.name in target_dict: + debug('deps: checking for orphaned targets') + + for t in tgt_list: + if getattr(t, 'samba_used', False) == True: continue - if not getattr(t, 'add_init_functions_done', False): - add_init_functions(t) + type = target_dict[t.sname] + if not type in ['BINARY', 'LIBRARY', 'MODULE', 'ET', 'PYTHON']: + if re.search('^PIDL_', t.sname) is None: + print "Target %s of type %s is unused by any other target" % (t.sname, type) + + +def show_final_deps(bld, tgt_list): + '''show the final dependencies for all targets''' + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') - for t in bld.all_task_gen: - if not t.name in target_dict: + for t in tgt_list: + if not targets[t.sname] in ['LIBRARY', 'BINARY', 'PYTHON']: continue - if getattr(t, 'samba_used', False) == True: + debug('deps: final dependencies for target %s: uselib=%s uselib_local=%s add_objects=%s', + t.sname, t.uselib, t.uselib_local, t.add_objects) + + +def add_samba_attributes(bld, tgt_list): + '''ensure a target has a the required samba attributes''' + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + + for t in tgt_list: + if t.name != '': + t.sname = t.name + else: + t.sname = t.target + t.samba_type = targets[t.sname] + t.samba_abspath = t.path.abspath(bld.env) + t.samba_deps_extended = t.samba_deps[:] + t.samba_includes_extended = TO_LIST(t.samba_includes)[:] + t.ccflags = getattr(t, 'samba_cflags', '') + +def build_direct_deps(bld, tgt_list): + '''build the direct_objects and direct_libs sets for each target''' + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + global_deps = bld.env.GLOBAL_DEPENDENCIES + + for t in tgt_list: + t.direct_objects = set() + t.direct_libs = set() + t.direct_syslibs = set() + deps = t.samba_deps_extended + deps.extend(global_deps) + for d in deps: + d = EXPAND_ALIAS(bld, d) + if not d in targets: + print "Unknown dependency %s in %s" % (d, t.sname) + raise + if targets[d] in [ 'EMPTY', 'DISABLED' ]: + continue + if targets[d] == 'SYSLIB': + t.direct_syslibs.add(d) + continue + t2 = bld.name_to_obj(d, bld.env) + if t2 is None: + print "no task %s type %s" % (d, targets[d]) + if t2.samba_type in [ 'LIBRARY', 'MODULE' ]: + t.direct_libs.add(d) + elif t2.samba_type in [ 'SUBSYSTEM', 'ASN1', 'PYTHON' ]: + t.direct_objects.add(d) + debug('deps: built direct dependencies') + + + +def indirect_libs(bld, t, chain): + '''recursively calculate the indirect library dependencies for a target + + An indirect library is a library that results from a dependency on + a subsystem + ''' + + ret = getattr(t, 'indirect_libs', None) + if ret is not None: + return ret + + ret = set() + for obj in t.direct_objects: + if obj in chain: continue - type = target_dict[t.name] - if type != 'BINARY' and type != 'LIBRARY' and type != 'MODULE': - if re.search('^PIDL_', t.name) is None: - print "Target %s of type %s is unused by any other target" % (t.name, type) + chain.add(obj) + t2 = bld.name_to_obj(obj, bld.env) + r2 = indirect_libs(bld, t2, chain) + chain.remove(obj) + ret = ret.union(t2.direct_libs) + ret = ret.union(r2) + + for obj in t.indirect_objects: + if obj in chain: + continue + chain.add(obj) + t2 = bld.name_to_obj(obj, bld.env) + r2 = indirect_libs(bld, t2, chain) + chain.remove(obj) + ret = ret.union(t2.direct_libs) + ret = ret.union(r2) + t.indirect_libs = ret -def CHECK_ORPANED_TARGETS(bld): - bld.add_pre_fun(check_orpaned_targets) -Build.BuildContext.CHECK_ORPANED_TARGETS = CHECK_ORPANED_TARGETS + return ret -@feature('dfkj*') -def samba_post_process(self): - '''samba specific post processing of task''' - if getattr(self, 'meths', None) is None: - return - count = getattr(self, 'moved_to_end', 0) - if count < 10: - # there has got to be a better way!! - self.moved_to_end = count + 1 - self.meths.append('samba_post_process') - return +def indirect_syslibs(bld, t, chain): + '''recursively calculate the indirect system library dependencies for a target - samba_post = getattr(self, 'samba_post', None) - if samba_post is None: - return - (tgt, cmd) = samba_post - self.env.TARGET_DIRECTORY = self.path.abspath(self.env) - #print "cmd=%s tgt=%s" % (cmd, tgt) - cmd = Utils.subst_vars(cmd, self.env) - tgt = Utils.subst_vars(tgt, self.env) - if os.path.isfile(tgt): - debug('deps: post processing for %s: %s' % (self.name, cmd)) - ret = os.system(cmd) - self.bld.ASSERT(ret == 0, "Post processing for %s failed (%d): %s" % (self.name, ret, cmd)) - - -############################## -# handle the creation of links for libraries and binaries -# note that we use a relative symlink path to allow the whole tree -# to me moved/copied elsewhere without breaking the links -t = Task.simple_task_type('symlink_lib', 'ln -sf ../${SRC} ${LINK_TARGET}', color='PINK', - ext_in='.bin') -t.quiet = True - -@feature('symlink_lib') -@after('apply_link') -def symlink_lib(self): - tsk = self.create_task('symlink_lib', self.link_task.outputs[0]) - - # calculat the link target and put it in the environment - soext="" - vnum = getattr(self, 'vnum', None) - if vnum is not None: - soext = '.' + vnum.split('.')[0] - - libname = self.target - tsk.env.LINK_TARGET = '%s/lib%s.so%s' % (LIB_PATH, libname, soext) - debug('task_gen: LINK_TARGET for %s is %s', self.name, tsk.env.LINK_TARGET) - - -# for binaries we need to copy the executable to avoid the rpath changing -# in the local bin/ directory on install -t = Task.simple_task_type('copy_bin', 'rm -f ${BIN_TARGET} && cp ${SRC} ${BIN_TARGET}', color='PINK', - ext_in='.bin', shell=True) -t.quiet = True - -@feature('copy_bin') -@after('apply_link') -def copy_bin(self): - if Options.is_install: - # we don't want to copy the install binary, as - # that has the install rpath, not the build rpath - # The rpath of the binaries in bin/default/foo/blah is different - # during the install phase, as distros insist on not using rpath in installed binaries + An indirect syslib results from a subsystem dependency + ''' + + ret = getattr(t, 'indirect_syslibs', None) + if ret is not None: + return ret + ret = set() + for obj in t.direct_objects: + if obj in chain: + continue + chain.add(obj) + t2 = bld.name_to_obj(obj, bld.env) + r2 = indirect_syslibs(bld, t2, chain) + chain.remove(obj) + ret = ret.union(t2.direct_syslibs) + ret = ret.union(r2) + + t.indirect_syslibs = ret + return ret + + +def indirect_objects(bld, t, chain): + '''recursively calculate the indirect object dependencies for a target + + indirect objects are the set of objects from expanding the + subsystem dependencies + ''' + + ret = getattr(t, 'indirect_objects', None) + if ret is not None: return ret + + ret = set() + for lib in t.direct_objects: + if lib in chain: + continue + chain.add(lib) + t2 = bld.name_to_obj(lib, bld.env) + r2 = indirect_objects(bld, t2, chain) + chain.remove(lib) + ret = ret.union(t2.direct_objects) + ret = ret.union(r2) + + t.indirect_objects = ret + return ret + + +def expanded_targets(bld, t, chain): + '''recursively calculate the expanded targets for a target + + expanded objects are the set of objects, libraries and syslibs + from expanding the subsystem dependencies, library dependencies + and syslib dependencies + ''' + + ret = getattr(t, 'expanded_targets', None) + if ret is not None: return ret + + ret = t.direct_objects.copy() + ret = ret.union(t.direct_libs) + ret = ret.union(t.direct_syslibs) + + direct = ret.copy() + + for d in direct: + if d in chain: continue + chain.add(d) + t2 = bld.name_to_obj(d, bld.env) + if t2 is None: continue + r2 = expanded_targets(bld, t2, chain) + chain.remove(d) + ret = ret.union(r2) + + if t.sname in ret: + ret.remove(t.sname) + + t.expanded_targets = ret + return ret + + +def expanded_targets2(bld, t, chain): + '''recursively calculate the expanded targets for a target + + expanded objects are the set of objects from expanding the + subsystem dependencies and library dependencies + ''' + + ret = getattr(t, 'expanded_targets2', None) + if ret is not None: return ret + + ret = t.final_objects.copy() + + for attr in [ 'final_objects', 'final_libs' ]: + f = getattr(t, attr, set()) + for d in f.copy(): + if d in chain: + continue + chain.add(d) + t2 = bld.name_to_obj(d, bld.env) + if t2 is None: continue + r2 = expanded_targets2(bld, t2, chain) + chain.remove(d) + ret = ret.union(r2) + + if t.sname in ret: + ret.remove(t.sname) + + t.expanded_targets2 = ret + return ret + + +def includes_objects(bld, t, chain): + '''recursively calculate the includes object dependencies for a target + + includes dependencies come from either library or object dependencies + ''' + ret = getattr(t, 'includes_objects', None) + if ret is not None: + return ret + + ret = t.direct_objects.copy() + ret = ret.union(t.direct_libs) + + for obj in t.direct_objects: + if obj in chain: + continue + chain.add(obj) + t2 = bld.name_to_obj(obj, bld.env) + r2 = includes_objects(bld, t2, chain) + chain.remove(obj) + ret = ret.union(t2.direct_objects) + ret = ret.union(r2) + + for lib in t.direct_libs: + if lib in chain: + continue + chain.add(lib) + t2 = bld.name_to_obj(lib, bld.env) + r2 = includes_objects(bld, t2, chain) + chain.remove(lib) + ret = ret.union(t2.direct_objects) + ret = ret.union(r2) + + t.includes_objects = ret + return ret + + +def build_indirect_deps(bld, tgt_list): + '''build the indirect_objects and indirect_libs sets for each target''' + for t in tgt_list: + indirect_objects(bld, t, set()) + indirect_libs(bld, t, set()) + indirect_syslibs(bld, t, set()) + includes_objects(bld, t, set()) + expanded_targets(bld, t, set()) + debug('deps: built indirect dependencies') + + +def re_expand2(bld, tgt_list): + for t in tgt_list: + t.expanded_targets2 = None + for type in ['BINARY','LIBRARY','PYTHON']: + for t in tgt_list: + if t.samba_type == type: + expanded_targets2(bld, t, set()) + for t in tgt_list: + expanded_targets2(bld, t, set()) + + +def calculate_final_deps(bld, tgt_list): + '''calculate the final library and object dependencies''' + for t in tgt_list: + # start with the maximum possible list + t.final_syslibs = t.direct_syslibs.union(t.indirect_syslibs) + t.final_libs = t.direct_libs.union(t.indirect_libs) + t.final_objects = t.direct_objects.union(t.indirect_objects) + + for t in tgt_list: + # don't depend on ourselves + if t.sname in t.final_libs: + t.final_libs.remove(t.sname) + if t.sname in t.final_objects: + t.final_objects.remove(t.sname) + + re_expand2(bld, tgt_list) + + loops = {} + + # find any library loops + for t in tgt_list: + if t.samba_type in ['LIBRARY', 'PYTHON']: + for l in t.final_libs.copy(): + t2 = bld.name_to_obj(l, bld.env) + if t.sname in t2.final_libs: + debug('deps: removing library loop %s<->%s', t.sname, l) + t2.final_libs.remove(t.sname) + loops[t2.sname] = t.sname; + + re_expand2(bld, tgt_list) + + for type in ['BINARY']: + while True: + changed = False + for t in tgt_list: + if t.samba_type != type: continue + # if we will indirectly link to a target then we don't need it + new = t.final_objects.copy() + for l in t.final_libs: + t2 = bld.name_to_obj(l, bld.env) + dup = new.intersection(t2.expanded_targets2) + if dup: + debug('deps: removing dups from %s: %s also in %s %s', + t.sname, dup, t2.samba_type, l) + new = new.difference(dup) + changed = True + if changed: + t.final_objects = new + break + if not changed: + break + debug('deps: removed duplicate dependencies') + + +###################################################################### +# this provides a way to save our dependency calculations between runs +savedeps_version = 1 +savedeps_inputs = ['samba_deps', 'samba_includes', 'local_include', 'local_include_first', 'samba_cflags'] +savedeps_outputs = ['uselib', 'uselib_local', 'add_objects', 'includes', 'ccflags'] +savedeps_caches = ['GLOBAL_DEPENDENCIES', 'TARGET_ALIAS', 'TARGET_TYPE', 'INIT_FUNCTIONS'] + +def save_samba_deps(bld, tgt_list): + '''save the dependency calculations between builds, to make + further builds faster''' + denv = Environment.Environment() + + denv.version = savedeps_version + denv.savedeps_inputs = savedeps_inputs + denv.savedeps_outputs = savedeps_outputs + denv.input = {} + denv.output = {} + denv.caches = {} + + for c in savedeps_caches: + denv.caches[c] = LOCAL_CACHE(bld, c) + + for t in tgt_list: + # save all the input attributes for each target + tdeps = {} + for attr in savedeps_inputs: + v = getattr(t, attr, None) + if v is not None: + tdeps[attr] = v + if tdeps != {}: + denv.input[t.sname] = tdeps + + # save all the output attributes for each target + tdeps = {} + for attr in savedeps_outputs: + v = getattr(t, attr, None) + if v is not None: + tdeps[attr] = v + if tdeps != {}: + denv.output[t.sname] = tdeps + + depsfile = os.path.join(bld.bdir, "sambadeps") + denv.store(depsfile) + + +def load_samba_deps(bld, tgt_list): + '''load a previous set of build dependencies if possible''' + depsfile = os.path.join(bld.bdir, "sambadeps") + denv = Environment.Environment() + try: + debug('deps: checking saved dependencies') + denv.load(depsfile) + if (denv.version != savedeps_version or + denv.savedeps_inputs != savedeps_inputs or + denv.savedeps_outputs != savedeps_outputs): + return False + except: + return False + + # check if caches are the same + for c in savedeps_caches: + if c not in denv.caches or denv.caches[c] != LOCAL_CACHE(bld, c): + return False + + # check inputs are the same + for t in tgt_list: + tdeps = {} + for attr in savedeps_inputs: + v = getattr(t, attr, None) + if v is not None: + tdeps[attr] = v + if t.sname in denv.input: + olddeps = denv.input[t.sname] + else: + olddeps = {} + if tdeps != olddeps: + #print '%s: \ntdeps=%s \nodeps=%s' % (t.sname, tdeps, olddeps) + return False + + # put outputs in place + for t in tgt_list: + if not t.sname in denv.output: continue + tdeps = denv.output[t.sname] + for a in tdeps: + setattr(t, a, tdeps[a]) + + debug('deps: loaded saved dependencies') + return True + + +def check_project_rules(bld): + '''check the project rules - ensuring the targets are sane''' + + targets = LOCAL_CACHE(bld, 'TARGET_TYPE') + + # build a list of task generators we are interested in + tgt_list = [] + for tgt in targets: + type = targets[tgt] + if not type in ['SUBSYSTEM', 'MODULE', 'BINARY', 'LIBRARY', 'ASN1', 'PYTHON']: + continue + t = bld.name_to_obj(tgt, bld.env) + tgt_list.append(t) + + add_samba_attributes(bld, tgt_list) + + if load_samba_deps(bld, tgt_list): return - tsk = self.create_task('copy_bin', self.link_task.outputs[0]) - tsk.env.BIN_TARGET = self.target - debug('task_gen: BIN_TARGET for %s is %s', self.name, tsk.env.BIN_TARGET) + debug('deps: project rules checking started') + + expand_subsystem_deps(bld) + build_direct_deps(bld, tgt_list) + build_indirect_deps(bld, tgt_list) + calculate_final_deps(bld, tgt_list) + + # run the various attribute generators + for f in [ build_dependencies, build_includes, add_init_functions ]: + debug('deps: project rules checking %s', f) + for t in tgt_list: f(t) + + debug('deps: project rules stage1 completed') + + #check_orpaned_targets(bld, tgt_list) + #check_duplicate_sources(bld, tgt_list) + show_final_deps(bld, tgt_list) + + debug('deps: project rules checking completed - %u targets checked', + len(tgt_list)) + + save_samba_deps(bld, tgt_list) + + +def CHECK_PROJECT_RULES(bld): + '''enable checking of project targets for sanity''' + if bld.env.added_project_rules: + return + bld.env.added_project_rules = True + bld.add_pre_fun(check_project_rules) +Build.BuildContext.CHECK_PROJECT_RULES = CHECK_PROJECT_RULES diff --git a/buildtools/wafsamba/samba_errtable.py b/buildtools/wafsamba/samba_errtable.py new file mode 100644 index 0000000000..d324a3541b --- /dev/null +++ b/buildtools/wafsamba/samba_errtable.py @@ -0,0 +1,26 @@ +# waf build tool for building .et files with compile_et +import Build, os +from samba_utils import * + +def SAMBA_ERRTABLE(bld, name, source): + '''Build a heimdal errtable from a .et file''' + + bname = source[0:-3]; # strip off the .et suffix + + if not SET_TARGET_TYPE(bld, name, 'ET'): + return + + bld.SET_BUILD_GROUP('build_source') + + out_files = [] + out_files.append('%s.c' % bname) + out_files.append('%s.h' % bname) + + t = bld(rule='${SRC[0].abspath(env)} . ${TGT[0].parent.abspath(env)} default/source4/heimdal_build/compile_et ${SRC[2].abspath(env)} ${TGT[0].bldpath(env)}', + ext_out = '.c', + before = 'cc', + shell = True, + source = ['et_compile_wrapper.sh', 'compile_et', source], + target = out_files, + name = name) +Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py index ef89db69a6..237020ba29 100644 --- a/buildtools/wafsamba/samba_patterns.py +++ b/buildtools/wafsamba/samba_patterns.py @@ -1,28 +1,9 @@ # a waf tool to add extension based build patterns for Samba -import os, sys, Options -import string, Task, Utils, optparse -from Configure import conf -from Logs import debug +import Task from TaskGen import extension from samba_utils import * -################################################################################ -# a et task which calls out to compile_et to do the work -Task.simple_task_type('et', - '../heimdal_build/et_compile_wrapper.sh . ${TGT[0].bld_dir(env)} default/source4/heimdal_build/compile_et ${SRC[0].abspath(env)} ${TGT[0].bldpath(env)}', - color='BLUE', ext_out='.c', - shell = False) - -@extension('.et') -def process_et(self, node): - c_node = node.change_ext('.c') - h_node = node.change_ext('.h') - self.create_task('et', node, [c_node, h_node]) - self.allnodes.append(c_node) - - - def SAMBA_MKVERSION(bld, target): '''generate the version.h header for Samba''' bld.SET_BUILD_GROUP('setup') diff --git a/buildtools/wafsamba/samba_pidl.py b/buildtools/wafsamba/samba_pidl.py index d37e7f1d23..e76e029a12 100644 --- a/buildtools/wafsamba/samba_pidl.py +++ b/buildtools/wafsamba/samba_pidl.py @@ -1,7 +1,7 @@ # waf build tool for building IDL files with pidl -from TaskGen import taskgen, before -import Build, os, string, Utils +from TaskGen import before +import Build, os from samba_utils import * def SAMBA_PIDL(bld, pname, source, options='', output_dir='.'): @@ -41,7 +41,11 @@ def SAMBA_PIDL(bld, pname, source, options='', output_dir='.'): # remember this one for the tables generation table_header_idx = len(out_files) - 1 - pidl = bld.srcnode.find_resource('pidl/pidl').relpath_gen(bld.path) + # depend on the full pidl sources + source = TO_LIST(source) + pidl_src = [x.relpath_gen(bld.path) for x in + bld.srcnode.ant_glob('pidl/**/*', flat=False)] + source.extend(pidl_src) # the cd .. is needed because pidl currently is sensitive to the directory it is run in t = bld(rule='cd .. && ${PIDL} ${OPTIONS} --outputdir ${OUTPUTDIR} -- ${SRC[0].abspath(env)}', @@ -54,8 +58,7 @@ def SAMBA_PIDL(bld, pname, source, options='', output_dir='.'): t.env.PIDL = "../pidl/pidl" t.env.OPTIONS = TO_LIST(options) - t.env.OUTPUTDIR = 'bin/' + bld.BUILD_PATH(output_dir) - + t.env.OUTPUTDIR = bld.bldnode.name + '/' + bld.path.find_dir(output_dir).bldpath(t.env) if table_header_idx is not None: pidl_headers = LOCAL_CACHE(bld, 'PIDL_HEADERS') diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index 0845a7e61c..4073dcf9bb 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -1,7 +1,6 @@ # waf build tool for building IDL files with pidl -from TaskGen import taskgen, before -import Build, os, string, Utils +import Build from samba_utils import * from samba_autoconf import * @@ -18,6 +17,25 @@ def SAMBA_PYTHON(bld, name, enabled=True): '''build a python extension for Samba''' + # when we support static python modules we'll need to gather + # the list from all the SAMBA_PYTHON() targets + if init_function_sentinal is not None: + cflags += '-DSTATIC_LIBPYTHON_MODULES="%s"' % init_function_sentinal + + if realname is None: + # a SAMBA_PYTHON target without a realname is just a + # subsystem with needs_python=True + return bld.SAMBA_SUBSYSTEM(name, + source=source, + deps=deps, + public_deps=public_deps, + cflags=cflags, + includes=includes, + init_function_sentinal=init_function_sentinal, + local_include=local_include, + needs_python=True, + enabled=enabled) + if not enabled: SET_TARGET_TYPE(bld, name, 'DISABLED') return @@ -27,18 +45,19 @@ def SAMBA_PYTHON(bld, name, deps += ' ' + public_deps - # when we support static python modules we'll need to gather - # the list from all the SAMBA_PYTHON() targets - if init_function_sentinal is not None: - cflags += '-DSTATIC_LIBPYTHON_MODULES="%s"' % init_function_sentinal + if realname is None: + link_name = 'python/%s.so' % name + else: + link_name = 'python/%s' % realname t = bld( - features = 'cc cshlib pyext', + features = 'cc cshlib pyext symlink_lib', source = source, target = name, - ccflags = CURRENT_CFLAGS(bld, name, cflags), + samba_cflags = CURRENT_CFLAGS(bld, name, cflags), samba_includes = includes, local_include = local_include, - samba_deps = TO_LIST(deps) + samba_deps = TO_LIST(deps), + link_name = link_name ) Build.BuildContext.SAMBA_PYTHON = SAMBA_PYTHON diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py index 5db9f2542a..d01edcf3b4 100644 --- a/buildtools/wafsamba/samba_utils.py +++ b/buildtools/wafsamba/samba_utils.py @@ -1,11 +1,10 @@ # a waf tool to add autoconf-like macros to the configure section # and for SAMBA_ macros for building libraries, binaries etc -import Build, os, Logs, sys, Configure, Options, string, Task, Utils, optparse +import Build, os, sys, Options, Utils from TaskGen import feature, before from Configure import conf from Logs import debug -from TaskGen import extension import shlex # TODO: make this a --option @@ -102,7 +101,7 @@ Build.BuildContext.ASSERT = ASSERT def SUBDIR(bld, subdir, list): ret = '' for l in TO_LIST(list): - ret = ret + subdir + '/' + l + ' ' + ret = ret + os.path.normpath(os.path.join(subdir, l)) + ' ' return ret Build.BuildContext.SUBDIR = SUBDIR @@ -189,16 +188,22 @@ def ENABLE_MAGIC_ORDERING(bld): Build.BuildContext.ENABLE_MAGIC_ORDERING = ENABLE_MAGIC_ORDERING -def BUILD_PATH(bld, relpath): - '''return a relative build path, given a relative path - for example, if called in the source4/librpc directory, with the path - gen_ndr/tables.c, then it will return default/source4/gen_ndr/tables.c - ''' +os_path_relpath = getattr(os.path, 'relpath', None) +if os_path_relpath is None: + # Python < 2.6 does not have os.path.relpath, provide a replacement + # (imported from Python2.6.5~rc2) + def os_path_relpath(path, start): + """Return a relative version of a path""" + start_list = os.path.abspath(start).split("/") + path_list = os.path.abspath(path).split("/") - ret = os.path.normpath(os.path.join(os.path.relpath(bld.curdir, bld.env.TOPDIR), relpath)) - ret = 'default/%s' % ret - return ret -Build.BuildContext.BUILD_PATH = BUILD_PATH + # Work out how much of the filepath is shared by start and path. + i = len(os.path.commonprefix([start_list, path_list])) + + rel_list = ['..'] * (len(start_list)-i) + path_list[i:] + if not rel_list: + return start + return os.path.join(*rel_list) # this is a useful way of debugging some of the rules in waf @@ -276,3 +281,24 @@ Build.BuildContext.ENFORCE_GROUP_ORDERING = ENFORCE_GROUP_ORDERING # raise Utils.WafError('object %r was not found in uselib_local (required by add_objects %r)' % (x, self.name)) # y.post() # self.env.append_unique('INC_PATHS', y.env.INC_PATHS) + + +def recursive_dirlist(dir, relbase): + '''recursive directory list''' + ret = [] + for f in os.listdir(dir): + f2 = dir + '/' + f + if os.path.isdir(f2): + ret.extend(recursive_dirlist(f2, relbase)) + else: + ret.append(os_path_relpath(f2, relbase)) + return ret + + +def mkdir_p(dir): + '''like mkdir -p''' + if os.path.isdir(dir): + return + mkdir_p(os.path.dirname(dir)) + os.mkdir(dir) + diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index e90bd35ef4..5b63c1eef9 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -1,16 +1,16 @@ # a waf tool to add autoconf-like macros to the configure section # and for SAMBA_ macros for building libraries, binaries etc -import Build, os, Logs, sys, Configure, Options, string, Task, Utils, optparse +import Build, os, Options, Task, Utils from Configure import conf from Logs import debug -from TaskGen import extension # bring in the other samba modules from samba_utils import * from samba_autoconf import * from samba_patterns import * from samba_pidl import * +from samba_errtable import * from samba_asn1 import * from samba_autoproto import * from samba_python import * @@ -19,25 +19,26 @@ from samba_deps import * LIB_PATH="shared" + ################################################################# # create the samba build environment @conf def SAMBA_BUILD_ENV(conf): - libpath="%s/%s" % (conf.blddir, LIB_PATH) conf.env['BUILD_DIRECTORY'] = conf.blddir - if not os.path.exists(libpath): - os.mkdir(libpath) + mkdir_p(os.path.join(conf.blddir, LIB_PATH)) + mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc')) + ################################################################ # add an init_function to the list for a subsystem -def ADD_INIT_FUNCTION(bld, subsystem, init_function): +def ADD_INIT_FUNCTION(bld, subsystem, target, init_function): if init_function is None: return bld.ASSERT(subsystem is not None, "You must specify a subsystem for init_function '%s'" % init_function) cache = LOCAL_CACHE(bld, 'INIT_FUNCTIONS') if not subsystem in cache: cache[subsystem] = [] - cache[subsystem].append(init_function) + cache[subsystem].append( { 'TARGET':target, 'INIT_FUNCTION':init_function } ) Build.BuildContext.ADD_INIT_FUNCTION = ADD_INIT_FUNCTION @@ -50,7 +51,7 @@ def SAMBA_LIBRARY(bld, libname, source, public_headers=None, vnum=None, cflags='', - output_type=None, + external_library=False, realname=None, autoproto=None, group='main', @@ -73,7 +74,7 @@ def SAMBA_LIBRARY(bld, libname, source, features = 'cc cshlib symlink_lib', source = source, target = libname, - ccflags = CURRENT_CFLAGS(bld, libname, cflags), + samba_cflags = CURRENT_CFLAGS(bld, libname, cflags), depends_on = depends_on, samba_deps = TO_LIST(deps), samba_includes = includes, @@ -98,10 +99,10 @@ def SAMBA_BINARY(bld, binname, source, autoproto=None, use_hostcc=None, compiler=None, - group='main', + group='binaries', manpages=None, local_include=True, - subsystem=None, + subsystem_name=None, needs_python=False): if not SET_TARGET_TYPE(bld, binname, 'BINARY'): @@ -116,38 +117,26 @@ def SAMBA_BINARY(bld, binname, source, features = features, source = source, target = binname, - ccflags = CURRENT_CFLAGS(bld, binname, cflags), + samba_cflags = CURRENT_CFLAGS(bld, binname, cflags), samba_deps = TO_LIST(deps), samba_includes = includes, local_include = local_include, samba_modules = modules, top = True, - samba_subsystem= subsystem + samba_subsystem= subsystem_name ) + # setup the subsystem_name as an alias for the real + # binary name, so it can be found when expanding + # subsystem dependencies + if subsystem_name is not None: + bld.TARGET_ALIAS(subsystem_name, binname) + if autoproto is not None: bld.SAMBA_AUTOPROTO(autoproto, source) Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY -################################################################# -# define a Samba ET target -def SAMBA_ERRTABLE(bld, name, source, - options='', - directory=''): -# print "Skipping ERRTABLE rule for %s with source=%s" % (name, source) -# return - if not SET_TARGET_TYPE(bld, name, 'ET'): - return - bld.SET_BUILD_GROUP('build_source') - bld( - features = 'cc', - source = source, - target = name, - includes = '# #source4/heimdal_build #source4 #lib/replace' - ) -Build.BuildContext.SAMBA_ERRTABLE = SAMBA_ERRTABLE - ################################################################# # define a Samba module. def SAMBA_MODULE(bld, modname, source, @@ -159,12 +148,12 @@ def SAMBA_MODULE(bld, modname, source, autoproto_extra_source='', aliases=None, cflags='', - output_type=None, + internal_module=True, local_include=True, enabled=True): - if output_type == 'MERGED_OBJ': - # treat merged object modules as subsystems for now + if internal_module: + # treat internal modules as subsystems for now SAMBA_SUBSYSTEM(bld, modname, source, deps=deps, includes=includes, @@ -177,7 +166,8 @@ def SAMBA_MODULE(bld, modname, source, # add it to the init_function list # TODO: we should also create an implicit dependency # between the subsystem target and this target - bld.ADD_INIT_FUNCTION(subsystem, init_function) + if enabled: + bld.ADD_INIT_FUNCTION(subsystem, modname, init_function) return if not enabled: @@ -193,7 +183,7 @@ def SAMBA_MODULE(bld, modname, source, return - bld.ADD_INIT_FUNCTION(subsystem, init_function) + bld.ADD_INIT_FUNCTION(subsystem, modname, init_function) if subsystem is not None: deps += ' ' + subsystem @@ -203,7 +193,7 @@ def SAMBA_MODULE(bld, modname, source, features = 'cc', source = source, target = modname, - ccflags = CURRENT_CFLAGS(bld, modname, cflags), + samba_cflags = CURRENT_CFLAGS(bld, modname, cflags), samba_includes = includes, local_include = local_include, samba_deps = TO_LIST(deps) @@ -234,18 +224,14 @@ def SAMBA_SUBSYSTEM(bld, modname, source, depends_on='', local_include=True, local_include_first=True, - enabled=True): + subsystem_name=None, + enabled=True, + needs_python=False): if not enabled: SET_TARGET_TYPE(bld, modname, 'DISABLED') return - # if the caller specifies a config_option, then we create a blank - # subsystem if that configuration option was found at configure time - if (config_option is not None) and bld.CONFIG_SET(config_option): - SET_TARGET_TYPE(bld, modname, 'EMPTY') - return - # remember empty subsystems, so we can strip the dependencies if (source == '') or (source == []): SET_TARGET_TYPE(bld, modname, 'EMPTY') @@ -258,16 +244,21 @@ def SAMBA_SUBSYSTEM(bld, modname, source, bld.SET_BUILD_GROUP(group) + features = 'cc' + if needs_python: + features += ' pyext' + t = bld( - features = 'cc', + features = features, source = source, target = modname, - ccflags = CURRENT_CFLAGS(bld, modname, cflags), + samba_cflags = CURRENT_CFLAGS(bld, modname, cflags), depends_on = depends_on, samba_deps = TO_LIST(deps), samba_includes = includes, local_include = local_include, - local_include_first = local_include_first + local_include_first = local_include_first, + samba_subsystem= subsystem_name ) if heimdal_autoproto is not None: @@ -334,6 +325,7 @@ def SETUP_BUILD_GROUPS(bld): bld.add_group('build_source') bld.add_group('prototypes') bld.add_group('main') + bld.add_group('binaries') bld.add_group('final') Build.BuildContext.SETUP_BUILD_GROUPS = SETUP_BUILD_GROUPS @@ -360,3 +352,91 @@ def h_file(filename): @conf def ENABLE_TIMESTAMP_DEPENDENCIES(conf): Utils.h_file = h_file + + +############################## +# handle the creation of links for libraries and binaries +# note that we use a relative symlink path to allow the whole tree +# to me moved/copied elsewhere without breaking the links +t = Task.simple_task_type('symlink_lib', 'ln -sf ${LINK_SOURCE} ${LINK_TARGET}', + color='PINK', ext_in='.bin') +t.quiet = True + +@feature('symlink_lib') +@after('apply_link') +def symlink_lib(self): + tsk = self.create_task('symlink_lib', self.link_task.outputs[0]) + + # calculat the link target and put it in the environment + soext="" + vnum = getattr(self, 'vnum', None) + if vnum is not None: + soext = '.' + vnum.split('.')[0] + + link_target = getattr(self, 'link_name', '') + if link_target == '': + link_target = '%s/lib%s.so%s' % (LIB_PATH, self.sname, soext) + + + link_source = os_path_relpath(self.link_task.outputs[0].abspath(self.env), + os.path.join(self.env.BUILD_DIRECTORY, link_target)) + + tsk.env.LINK_TARGET = link_target + tsk.env.LINK_SOURCE = link_source[3:] + debug('task_gen: LINK for %s is %s -> %s', + self.name, tsk.env.LINK_SOURCE, tsk.env.LINK_TARGET) + +# for binaries we need to copy the executable to avoid the rpath changing +# in the local bin/ directory on install +t = Task.simple_task_type('copy_bin', 'rm -f ${BIN_TARGET} && cp ${SRC} ${BIN_TARGET}', color='PINK', + ext_in='.bin', shell=True) +t.quiet = True + +@feature('copy_bin') +@after('apply_link') +def copy_bin(self): + if Options.is_install: + # we don't want to copy the install binary, as + # that has the install rpath, not the build rpath + # The rpath of the binaries in bin/default/foo/blah is different + # during the install phase, as distros insist on not using rpath in installed binaries + return + tsk = self.create_task('copy_bin', self.link_task.outputs[0]) + + tsk.env.BIN_TARGET = self.target + debug('task_gen: BIN_TARGET for %s is %s', self.name, tsk.env.BIN_TARGET) + + + + +t = Task.simple_task_type('copy_script', 'ln -sf ${SRC[0].abspath(env)} ${LINK_TARGET}', + color='PINK', ext_in='.bin', shell=True) +t.quiet = True + +@feature('copy_script') +@before('apply_link') +def copy_script(self): + tsk = self.create_task('copy_script', self.allnodes[0]) + tsk.env.TARGET = self.target + +def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None): + '''used to copy scripts from the source tree into the build directory + for use by selftest''' + + source = bld.path.ant_glob(pattern) + + bld.SET_BUILD_GROUP('build_source') + for s in TO_LIST(source): + iname = s + if installname != None: + iname = installname + target = os.path.join(installdir, iname) + tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), '..', target)) + mkdir_p(tgtdir) + t = bld(features='copy_script', + source=s, + target = target, + always=True) + t.env.LINK_TARGET = target + +Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT diff --git a/lib/replace/wscript b/lib/replace/wscript index e3f7075897..ab7ef9783d 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -28,7 +28,7 @@ def set_options(opt): action="store_true", dest='developer', default=False) opt.add_option('--timestamp-dependencies', help=("use file timestamps instead of content for build dependencies (BROKEN)"), - action="store", dest='timestamp_dependencies', default=False) + action="store_true", dest='timestamp_dependencies', default=False) @wafsamba.runonce def configure(conf): @@ -43,7 +43,7 @@ def configure(conf): conf.check_tool('compiler_cc') # gccdeps can be useful for debugging recursion in #include lines - # conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba") + conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba") # make the install paths available in environment conf.env.LIBDIR = Options.options.LIBDIR @@ -52,6 +52,9 @@ def configure(conf): conf.env.RPATH_ON_INSTALL = Options.options.enable_rpath + # we should use the PIC options in waf instead + conf.ADD_CFLAGS('-fPIC') + # check for pkgconfig conf.check_cfg(atleast_pkgconfig_version='0.0.0') @@ -163,6 +166,7 @@ def configure(conf): conf.CHECK_FUNCS_IN('poptGetContext', 'popt') conf.CHECK_FUNCS_IN('res_search', 'resolv') conf.CHECK_FUNCS_IN('gettext', 'intl') + conf.CHECK_FUNCS_IN('pthread_create', 'pthread') conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True) @@ -269,8 +273,6 @@ def configure(conf): cflags=conf.env.VISIBILITY_CFLAGS, define='HAVE_VISIBILITY_ATTR') - # use this later -> conf.recurse('.', name='getpass') - if conf.CHECK_FUNCS('getpass getpassphrase'): # if we have both, then we prefer getpassphrase conf.DEFINE(REPLACE_GETPASS_BY_GETPASSPHRASE, 1) @@ -294,7 +296,8 @@ def build(bld): bld.SAMBA_LIBRARY('replace', source=REPLACE_SOURCE, - group='base_libraries') + group='base_libraries', + deps='LIBREPLACE_GETPASS') TEST_SOURCES = '''test/testsuite.c test/main.c test/strptime.c test/os2_delete.c test/getifaddrs.c''' @@ -317,3 +320,8 @@ def build(bld): if not 'HAVE_CRYPT' in bld.env: CRYPT_SOURCES.append('crypt.c') bld.SAMBA_SUBSYSTEM('LIBREPLACE_EXT', CRYPT_SOURCES) + + bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c', + enabled=bld.CONFIG_SET('REPLACE_GETPASS')) + + bld.CHECK_PROJECT_RULES() diff --git a/lib/subunit/python/wscript_build b/lib/subunit/python/wscript_build new file mode 100644 index 0000000000..f690ae30d5 --- /dev/null +++ b/lib/subunit/python/wscript_build @@ -0,0 +1,16 @@ + +# install out various python scripts for use by make test + +bld.SAMBA_SCRIPT('python_iso8601', + pattern='iso8601/**/*.py', + installdir='python') + + +bld.SAMBA_SCRIPT('python_subunit', + pattern='subunit/**/*.py', + installdir='python') + + +bld.SAMBA_SCRIPT('python_testtools', + pattern='testtools/**/*.py', + installdir='python') diff --git a/libcli/nbt/wscript_build b/libcli/nbt/wscript_build index 3055e19a60..979ef53f30 100644 --- a/libcli/nbt/wscript_build +++ b/libcli/nbt/wscript_build @@ -9,7 +9,7 @@ bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF', bld.SAMBA_SUBSYSTEM('LIBCLI_NBT', - source='lmhosts.c nbtsocket.c namequery.c nameregister.c namerefresh.c namerelease.c', + source='lmhosts.c nbtsocket.c namequery.c nameregister.c namerefresh.c namerelease.c dns_hosts_file.c', public_deps='LIBNDR NDR_NBT LIBCLI_COMPOSITE LIBEVENTS NDR_SECURITY samba_socket LIBSAMBA-UTIL' ) diff --git a/libcli/security/wscript_build b/libcli/security/wscript_build index bb3a2d4e92..5bf24e4786 100644 --- a/libcli/security/wscript_build +++ b/libcli/security/wscript_build @@ -3,7 +3,7 @@ bld.SAMBA_SUBSYSTEM('LIBSECURITY_COMMON', - source='dom_sid.c display_sec.c secace.c secacl.c security_descriptor.c', + source='dom_sid.c display_sec.c secace.c secacl.c security_descriptor.c sddl.c', deps='talloc' ) diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build index baa3411aef..0af59358cd 100644 --- a/nsswitch/wscript_build +++ b/nsswitch/wscript_build @@ -3,8 +3,9 @@ bld.SAMBA_SUBSYSTEM('LIBWINBIND-CLIENT', - source='wb_common.c' - ) + source='wb_common.c', + cflags='-DSOCKET_WRAPPER_DISABLE=1' + ) bld.SAMBA_BINARY('nsstest', diff --git a/source4/Makefile.waf b/source4/Makefile.waf new file mode 100644 index 0000000000..50a55ab84f --- /dev/null +++ b/source4/Makefile.waf @@ -0,0 +1,20 @@ +# very crude Makefile to run waf +WAF=WAFCACHE=$(HOME)/.wafcache ../buildtools/waf + +all: + $(WAF) build -v + +install: + $(WAF) install + +uninstall: + $(WAF) uninstall + +clean: + $(WAF) clean + +distclean: + rm -rf bin + +*: + echo "target not implemented" diff --git a/source4/auth/gensec/wscript_build b/source4/auth/gensec/wscript_build index a504e38689..444608d644 100644 --- a/source4/auth/gensec/wscript_build +++ b/source4/auth/gensec/wscript_build @@ -1,7 +1,3 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/auth/gensec/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_LIBRARY('gensec', source='gensec.c socket.c', # PC_FILES='gensec.pc', @@ -49,7 +45,7 @@ bld.SAMBA_MODULE('gensec_schannel', source='schannel.c ../../../libcli/auth/schannel_sign.c', subsystem='gensec', deps='COMMON_SCHANNELDB NDR_SCHANNEL CREDENTIALS LIBNDR auth_session', - output_type='MERGED_OBJ', + internal_module=True, autoproto='schannel_proto.h', init_function='gensec_schannel_init' ) diff --git a/source4/auth/ntlm/wscript_build b/source4/auth/ntlm/wscript_build index 2632e25a8f..dde33c6077 100644 --- a/source4/auth/ntlm/wscript_build +++ b/source4/auth/ntlm/wscript_build @@ -1,7 +1,3 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/auth/ntlm/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_MODULE('auth_sam_module', source='auth_sam.c', subsystem='auth', @@ -59,6 +55,6 @@ bld.SAMBA_MODULE('auth', subsystem='service', init_function='server_service_auth_init', deps='LIBSAMBA-UTIL LIBSECURITY SAMDB CREDENTIALS UTIL_TEVENT', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/auth/ntlmssp/wscript_build b/source4/auth/ntlmssp/wscript_build index 625762029d..3fbf254515 100644 --- a/source4/auth/ntlmssp/wscript_build +++ b/source4/auth/ntlmssp/wscript_build @@ -8,6 +8,6 @@ bld.SAMBA_MODULE('gensec_ntlmssp', subsystem='gensec', init_function='gensec_ntlmssp_init', deps='MSRPC_PARSE CREDENTIALS', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/auth/wscript_build b/source4/auth/wscript_build index 5985551511..ddfb046bad 100644 --- a/source4/auth/wscript_build +++ b/source4/auth/wscript_build @@ -33,7 +33,7 @@ bld.SAMBA_SUBSYSTEM('auth_system_session', bld.SAMBA_SUBSYSTEM('auth_sam', source='sam.c', autoproto='auth_sam.h', - public_deps='SAMDB UTIL_LDB LIBSECURITY', + public_deps='SAMDB UTIL_LDB LIBSECURITY ldb', deps='' ) diff --git a/source4/autogen-waf.sh b/source4/autogen-waf.sh new file mode 100755 index 0000000000..f168e69676 --- /dev/null +++ b/source4/autogen-waf.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "Setting up for waf build" +rm -f configure Makefile +cp configure.waf configure + +# this relies on the fact that make looks for 'makefile' before 'Makefile' +cp Makefile.waf makefile + +echo "done ... now run ./configure or ./configure.developer" diff --git a/source4/client/wscript_build b/source4/client/wscript_build index 12b609b82e..6f5df10b58 100644 --- a/source4/client/wscript_build +++ b/source4/client/wscript_build @@ -1,7 +1,3 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/client/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_BINARY('smbclient', source='client.c', installdir='BINDIR', diff --git a/source4/configure.waf b/source4/configure.waf new file mode 100755 index 0000000000..cf45177c20 --- /dev/null +++ b/source4/configure.waf @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Using waf based build" + +WAF=../buildtools/waf +export WAFCACHE=$HOME/.wafcache +mkdir -p $WAFCACHE + +$WAF configure $* diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build b/source4/dsdb/samdb/ldb_modules/wscript_build index 7a01ecec9b..76503ef82b 100644 --- a/source4/dsdb/samdb/ldb_modules/wscript_build +++ b/source4/dsdb/samdb/ldb_modules/wscript_build @@ -1,7 +1,3 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/dsdb/samdb/ldb_modules/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPERS', source='util.c ridalloc.c', autoproto='util_proto.h', @@ -11,7 +7,7 @@ bld.SAMBA_SUBSYSTEM('DSDB_MODULE_HELPERS', bld.SAMBA_MODULE('ldb_samba_dsdb', source='samba_dsdb.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(samba_dsdb)', deps='SAMDB talloc LIBEVENTS LIBNDR DSDB_MODULE_HELPERS' ) @@ -19,7 +15,7 @@ bld.SAMBA_MODULE('ldb_samba_dsdb', bld.SAMBA_MODULE('ldb_samba_secrets', source='samba_secrets.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(samba_secrets)', deps='SAMDB talloc LIBEVENTS LIBNDR' ) @@ -27,7 +23,7 @@ bld.SAMBA_MODULE('ldb_samba_secrets', bld.SAMBA_MODULE('ldb_objectguid', source='objectguid.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(objectguid)', deps='SAMDB talloc LIBEVENTS LIBNDR' ) @@ -35,7 +31,7 @@ bld.SAMBA_MODULE('ldb_objectguid', bld.SAMBA_MODULE('ldb_repl_meta_data', source='repl_meta_data.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(repl_meta_data)', deps='SAMDB talloc LIBEVENTS LIBNDR NDR_DRSUAPI NDR_DRSBLOBS LIBNDR DSDB_MODULE_HELPERS' ) @@ -43,7 +39,7 @@ bld.SAMBA_MODULE('ldb_repl_meta_data', bld.SAMBA_MODULE('ldb_dsdb_cache', source='dsdb_cache.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(dsdb_cache)', deps='SAMDB talloc LIBEVENTS' ) @@ -51,7 +47,7 @@ bld.SAMBA_MODULE('ldb_dsdb_cache', bld.SAMBA_MODULE('ldb_schema_load', source='schema_load.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(schema_load)', deps='SAMDB talloc LIBEVENTS DSDB_MODULE_HELPERS' ) @@ -59,7 +55,7 @@ bld.SAMBA_MODULE('ldb_schema_load', bld.SAMBA_MODULE('ldb_schema_data', source='schema_data.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(schema_data)', deps='SAMDB talloc LIBEVENTS DSDB_MODULE_HELPERS' ) @@ -67,7 +63,7 @@ bld.SAMBA_MODULE('ldb_schema_data', bld.SAMBA_MODULE('ldb_naming_fsmo', source='naming_fsmo.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(naming_fsmo)', deps='SAMDB talloc LIBEVENTS DSDB_MODULE_HELPERS' ) @@ -75,7 +71,7 @@ bld.SAMBA_MODULE('ldb_naming_fsmo', bld.SAMBA_MODULE('ldb_pdc_fsmo', source='pdc_fsmo.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(pdc_fsmo)', deps='SAMDB talloc LIBEVENTS DSDB_MODULE_HELPERS' ) @@ -83,7 +79,7 @@ bld.SAMBA_MODULE('ldb_pdc_fsmo', bld.SAMBA_MODULE('ldb_samldb', source='samldb.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(samldb)', deps='talloc LIBEVENTS SAMDB DSDB_MODULE_HELPERS' ) @@ -91,7 +87,7 @@ bld.SAMBA_MODULE('ldb_samldb', bld.SAMBA_MODULE('ldb_samba3sam', source='samba3sam.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(samba3sam)', deps='talloc LIBEVENTS ldb SMBPASSWD NSS_WRAPPER LIBSECURITY NDR_SECURITY' ) @@ -99,7 +95,7 @@ bld.SAMBA_MODULE('ldb_samba3sam', bld.SAMBA_MODULE('ldb_samba3sid', source='samba3sid.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(samba3sid)', deps='talloc LIBEVENTS ldb SMBPASSWD NSS_WRAPPER LIBSECURITY NDR_SECURITY' ) @@ -108,7 +104,7 @@ bld.SAMBA_MODULE('ldb_samba3sid', bld.SAMBA_MODULE('ldb_simple_ldap_map', source='simple_ldap_map.c', aliases='entryuuid nsuniqueid', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(entryuuid),LDB_MODULE(nsuniqueid)', deps='talloc LIBEVENTS ldb LIBNDR' ) @@ -116,7 +112,7 @@ bld.SAMBA_MODULE('ldb_simple_ldap_map', bld.SAMBA_MODULE('ldb_rootdse', source='rootdse.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(rootdse)', deps='talloc LIBEVENTS SAMDB' ) @@ -124,7 +120,7 @@ bld.SAMBA_MODULE('ldb_rootdse', bld.SAMBA_MODULE('ldb_password_hash', source='password_hash.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(password_hash)', deps='talloc LIBEVENTS SAMDB LIBCLI_AUTH NDR_DRSBLOBS KERBEROS HEIMDAL_HDB_KEYS HEIMDAL_KRB5' ) @@ -132,7 +128,7 @@ bld.SAMBA_MODULE('ldb_password_hash', bld.SAMBA_MODULE('ldb_local_password', source='local_password.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(local_password)', deps='talloc LIBEVENTS LIBNDR SAMDB' ) @@ -140,7 +136,7 @@ bld.SAMBA_MODULE('ldb_local_password', bld.SAMBA_MODULE('ldb_kludge_acl', source='kludge_acl.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(kludge_acl)', deps='talloc LIBEVENTS LIBSECURITY SAMDB' ) @@ -148,7 +144,7 @@ bld.SAMBA_MODULE('ldb_kludge_acl', bld.SAMBA_MODULE('ldb_extended_dn_in', source='extended_dn_in.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(extended_dn_in)', deps='talloc LIBEVENTS LIBSAMBA-UTIL' ) @@ -157,7 +153,7 @@ bld.SAMBA_MODULE('ldb_extended_dn_in', bld.SAMBA_MODULE('ldb_extended_dn_out', source='extended_dn_out.c', aliases='extended_dn_out_ldb extended_dn_out_openldap extended_dn_out_fds', - subsystem='ldb', + subsystem='LIBLDB', deps='talloc LIBEVENTS LIBNDR LIBSAMBA-UTIL SAMDB', init_function='LDB_MODULE(extended_dn_out_ldb),LDB_MODULE(extended_dn_out_openldap),LDB_MODULE(extended_dn_out_fds)' ) @@ -165,7 +161,7 @@ bld.SAMBA_MODULE('ldb_extended_dn_out', bld.SAMBA_MODULE('ldb_extended_dn_store', source='extended_dn_store.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(extended_dn_store)', deps='talloc LIBEVENTS LIBSAMBA-UTIL SAMDB DSDB_MODULE_HELPERS' ) @@ -173,7 +169,7 @@ bld.SAMBA_MODULE('ldb_extended_dn_store', bld.SAMBA_MODULE('ldb_show_deleted', source='show_deleted.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(show_deleted)', deps='talloc LIBEVENTS LIBSAMBA-UTIL' ) @@ -182,7 +178,7 @@ bld.SAMBA_MODULE('ldb_show_deleted', bld.SAMBA_MODULE('ldb_partition', source='partition.c partition_init.c', autoproto='partition_proto.h', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(partition)', deps='talloc LIBEVENTS SAMDB DSDB_MODULE_HELPERS' ) @@ -190,7 +186,7 @@ bld.SAMBA_MODULE('ldb_partition', bld.SAMBA_MODULE('ldb_new_partition', source='new_partition.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(new_partition)', deps='talloc LIBEVENTS SAMDB DSDB_MODULE_HELPERS' ) @@ -198,15 +194,15 @@ bld.SAMBA_MODULE('ldb_new_partition', bld.SAMBA_MODULE('ldb_update_keytab', source='update_keytab.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(update_keytab)', - deps='talloc LIBEVENTS CREDENTIALS' + deps='talloc LIBEVENTS CREDENTIALS ldb' ) bld.SAMBA_MODULE('ldb_objectclass', source='objectclass.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(objectclass)', deps='talloc LIBEVENTS LIBSECURITY NDR_SECURITY SAMDB DSDB_MODULE_HELPERS LIBSAMBA-UTIL' ) @@ -214,15 +210,15 @@ bld.SAMBA_MODULE('ldb_objectclass', bld.SAMBA_MODULE('ldb_subtree_rename', source='subtree_rename.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(subtree_rename)', - deps='talloc LIBEVENTS LIBSAMBA-UTIL' + deps='talloc LIBEVENTS LIBSAMBA-UTIL ldb' ) bld.SAMBA_MODULE('ldb_subtree_delete', source='subtree_delete.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(subtree_delete)', deps='talloc LIBEVENTS LIBSAMBA-UTIL DSDB_MODULE_HELPERS' ) @@ -230,7 +226,7 @@ bld.SAMBA_MODULE('ldb_subtree_delete', bld.SAMBA_MODULE('ldb_linked_attributes', source='linked_attributes.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(linked_attributes)', deps='talloc LIBEVENTS SAMDB DSDB_MODULE_HELPERS' ) @@ -238,15 +234,15 @@ bld.SAMBA_MODULE('ldb_linked_attributes', bld.SAMBA_MODULE('ldb_ranged_results', source='ranged_results.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(ranged_results)', - deps='talloc LIBEVENTS LIBSAMBA-UTIL' + deps='talloc LIBEVENTS LIBSAMBA-UTIL ldb' ) bld.SAMBA_MODULE('ldb_anr', source='anr.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(anr)', deps='talloc LIBEVENTS LIBSAMBA-UTIL SAMDB' ) @@ -254,7 +250,7 @@ bld.SAMBA_MODULE('ldb_anr', bld.SAMBA_MODULE('ldb_instancetype', source='instancetype.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(instancetype)', deps='talloc LIBEVENTS LIBSAMBA-UTIL SAMDB' ) @@ -262,15 +258,15 @@ bld.SAMBA_MODULE('ldb_instancetype', bld.SAMBA_MODULE('ldb_operational', source='operational.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(operational)', - deps='talloc tevent LIBSAMBA-UTIL SAMDB_COMMON DSDB_MODULE_HELPERS' + deps='talloc tevent LIBSAMBA-UTIL SAMDB_COMMON DSDB_MODULE_HELPERS auth_sam' ) bld.SAMBA_MODULE('ldb_descriptor', source='descriptor.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(descriptor)', deps='talloc LIBEVENTS LIBSECURITY NDR_SECURITY SAMDB DSDB_MODULE_HELPERS' ) @@ -278,7 +274,7 @@ bld.SAMBA_MODULE('ldb_descriptor', bld.SAMBA_MODULE('ldb_resolve_oids', source='resolve_oids.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(resolve_oids)', deps='SAMDB talloc LIBEVENTS LIBNDR' ) @@ -286,7 +282,7 @@ bld.SAMBA_MODULE('ldb_resolve_oids', bld.SAMBA_MODULE('ldb_acl', source='acl.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(acl)', deps='talloc LIBEVENTS LIBSECURITY SAMDB' ) @@ -294,7 +290,7 @@ bld.SAMBA_MODULE('ldb_acl', bld.SAMBA_MODULE('ldb_lazy_commit', source='lazy_commit.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(lazy_commit)', deps='SAMDB' ) @@ -302,7 +298,7 @@ bld.SAMBA_MODULE('ldb_lazy_commit', bld.SAMBA_MODULE('ldb_validate_update', source='validate_update.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(validate_update)', deps='talloc LIBEVENTS LIBSECURITY SAMDB' ) diff --git a/source4/dsdb/wscript_build b/source4/dsdb/wscript_build index 3d3a35768f..0699dfdd28 100644 --- a/source4/dsdb/wscript_build +++ b/source4/dsdb/wscript_build @@ -12,9 +12,9 @@ bld.SAMBA_SUBSYSTEM('SAMDB', bld.SAMBA_SUBSYSTEM('SAMDB_COMMON', - source='common/util.c ./samdb/ldb_modules/util.c common/dsdb_dn.c ../../libds/common/flag_mapping.c', + source='common/util.c common/dsdb_dn.c common/dsdb_access.c ../../libds/common/flag_mapping.c', autoproto='common/proto.h', - deps='ldb NDR_DRSBLOBS LIBCLI_LDAP_NDR UTIL_LDB LIBCLI_AUTH' + deps='ldb NDR_DRSBLOBS LIBCLI_LDAP_NDR UTIL_LDB LIBCLI_AUTH DSDB_MODULE_HELPERS' ) diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build index 3117095824..6b0b951eba 100644 --- a/source4/heimdal_build/wscript_build +++ b/source4/heimdal_build/wscript_build @@ -126,68 +126,48 @@ bld.SAMBA_ASN1('HEIMDAL_PKCS10_ASN1', bld.SAMBA_ASN1('HEIMDAL_HDB_ASN1', '../heimdal/lib/hdb/hdb.asn1', - includes='../heimdal/lib/asn1', - directory='lib/hdb' - ) + includes='../heimdal/lib/asn1') bld.SAMBA_ERRTABLE('HEIMDAL_ASN1_ERR_ET', - '../heimdal/lib/asn1/asn1_err.et', - directory='lib/asn1' - ) + '../heimdal/lib/asn1/asn1_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_HDB_ERR_ET', - '../heimdal/lib/hdb/hdb_err.et', - directory='lib/hdb' - ) + '../heimdal/lib/hdb/hdb_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_HEIM_ERR_ET', - '../heimdal/lib/krb5/heim_err.et', - directory='lib/krb5' - ) + '../heimdal/lib/krb5/heim_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_K524_ERR_ET', - '../heimdal/lib/krb5/k524_err.et', - directory='lib/krb5' - ) + '../heimdal/lib/krb5/k524_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_KRB_ERR_ET', - '../heimdal/lib/krb5/krb_err.et', - directory='lib/krb5' - ) + '../heimdal/lib/krb5/krb_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_KRB5_ERR_ET', - '../heimdal/lib/krb5/krb5_err.et', - directory='lib/krb5' - ) + '../heimdal/lib/krb5/krb5_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_GKRB5_ERR_ET', - '../heimdal/lib/gssapi/krb5/gkrb5_err.et', - directory='lib/gssapi' - ) + '../heimdal/lib/gssapi/krb5/gkrb5_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_HX509_ERR_ET', - '../heimdal/lib/hx509/hx509_err.et', - directory='lib/hx509' - ) + '../heimdal/lib/hx509/hx509_err.et') bld.SAMBA_ERRTABLE('HEIMDAL_WIND_ERR_ET', - '../heimdal/lib/wind/wind_err.et', - directory='lib/wind' - ) + '../heimdal/lib/wind/wind_err.et') bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN', '../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c', includes='../heimdal/lib/roken ../heimdal/include ../../lib/socket_wrapper', - deps='HEIMDAL_ROKEN_PROGNAME HEIMDAL_ROKEN_CLOSEFROM resolv LIBREPLACE_NETWORK UID_WRAPPER' + deps='HEIMDAL_ROKEN_PROGNAME HEIMDAL_ROKEN_CLOSEFROM resolv LIBREPLACE_NETWORK UID_WRAPPER util' ) @@ -218,7 +198,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB_KEYS', bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB', source='''../heimdal/lib/hdb/db.c ../heimdal/lib/hdb/dbinfo.c ../heimdal/lib/hdb/hdb.c ../heimdal/lib/hdb/ext.c ../heimdal/lib/hdb/keytab.c ../heimdal/lib/hdb/mkey.c ../heimdal/lib/hdb/ndbm.c ../heimdal/lib/hdb/hdb_err.c hdb-glue.c''', - includes='../heimdal/lib/hdb', + includes='../heimdal/lib/hdb ../heimdal/lib/com_err', heimdal_autoproto='../heimdal/lib/hdb/hdb-protos.h', heimdal_autoproto_private='../heimdal/lib/hdb/hdb-private.h', deps='HDB_LDB HEIMDAL_KRB5 HEIMDAL_HDB_KEYS HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_COM_ERR HEIMDAL_HDB_ASN1' @@ -272,14 +252,44 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_GSSAPI', bld.SAMBA_SUBSYSTEM('HEIMDAL_KRB5', - '../heimdal/lib/krb5/acache.c ../heimdal/lib/krb5/add_et_list.c ../heimdal/lib/krb5/addr_families.c ../heimdal/lib/krb5/appdefault.c ../heimdal/lib/krb5/asn1_glue.c ../heimdal/lib/krb5/auth_context.c ../heimdal/lib/krb5/build_ap_req.c ../heimdal/lib/krb5/build_auth.c ../heimdal/lib/krb5/cache.c ../heimdal/lib/krb5/changepw.c ../heimdal/lib/krb5/codec.c ../heimdal/lib/krb5/config_file.c ../heimdal/lib/krb5/constants.c ../heimdal/lib/krb5/context.c ../heimdal/lib/krb5/convert_creds.c ../heimdal/lib/krb5/copy_host_realm.c ../heimdal/lib/krb5/crc.c ../heimdal/lib/krb5/creds.c ../heimdal/lib/krb5/crypto.c ../heimdal/lib/krb5/data.c ../heimdal/lib/krb5/eai_to_heim_errno.c ../heimdal/lib/krb5/error_string.c ../heimdal/lib/krb5/expand_hostname.c ../heimdal/lib/krb5/fcache.c ../heimdal/lib/krb5/free.c ../heimdal/lib/krb5/free_host_realm.c ../heimdal/lib/krb5/generate_seq_number.c ../heimdal/lib/krb5/generate_subkey.c ../heimdal/lib/krb5/get_addrs.c ../heimdal/lib/krb5/get_cred.c ../heimdal/lib/krb5/get_default_principal.c ../heimdal/lib/krb5/get_default_realm.c ../heimdal/lib/krb5/get_for_creds.c ../heimdal/lib/krb5/get_host_realm.c ../heimdal/lib/krb5/get_in_tkt.c ../heimdal/lib/krb5/get_port.c ../heimdal/lib/krb5/init_creds.c ../heimdal/lib/krb5/init_creds_pw.c ../heimdal/lib/krb5/kcm.c ../heimdal/lib/krb5/keyblock.c ../heimdal/lib/krb5/keytab.c ../heimdal/lib/krb5/keytab_any.c ../heimdal/lib/krb5/keytab_file.c ../heimdal/lib/krb5/keytab_memory.c ../heimdal/lib/krb5/keytab_keyfile.c ../heimdal/lib/krb5/krbhst.c ../heimdal/lib/krb5/log.c ../heimdal/lib/krb5/mcache.c ../heimdal/lib/krb5/misc.c ../heimdal/lib/krb5/mk_error.c ../heimdal/lib/krb5/mk_priv.c ../heimdal/lib/krb5/mk_rep.c ../heimdal/lib/krb5/mk_req.c ../heimdal/lib/krb5/mk_req_ext.c ../heimdal/lib/krb5/mit_glue.c ../heimdal/lib/krb5/n-fold.c ../heimdal/lib/krb5/padata.c ../heimdal/lib/krb5/pkinit.c ../heimdal/lib/krb5/plugin.c ../heimdal/lib/krb5/principal.c ../heimdal/lib/krb5/prog_setup.c ../heimdal/lib/krb5/pac.c ../heimdal/lib/krb5/prompter_posix.c ../heimdal/lib/krb5/rd_cred.c ../heimdal/lib/krb5/rd_error.c ../heimdal/lib/krb5/rd_priv.c ../heimdal/lib/krb5/rd_rep.c ../heimdal/lib/krb5/rd_req.c ../heimdal/lib/krb5/replay.c ../heimdal/lib/krb5/send_to_kdc.c ../heimdal/lib/krb5/set_default_realm.c ../heimdal/lib/krb5/store.c ../heimdal/lib/krb5/store_emem.c ../heimdal/lib/krb5/store_fd.c ../heimdal/lib/krb5/store_mem.c ../heimdal/lib/krb5/ticket.c ../heimdal/lib/krb5/time.c ../heimdal/lib/krb5/transited.c ../heimdal/lib/krb5/v4_glue.c ../heimdal/lib/krb5/version.c ../heimdal/lib/krb5/warn.c ../heimdal/lib/krb5/krb5_err.c ../heimdal/lib/krb5/heim_err.c ../heimdal/lib/krb5/k524_err.c krb5-glue.c', - includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/lib/com_err', - public_deps='HEIMDAL_COM_ERR', - heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h', - heimdal_autoproto_options='-E KRB5_LIB -q -P comment -o', - heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h', - deps='HEIMDAL_ROKEN HEIMDAL_PKINIT_ASN1 HEIMDAL_WIND HEIMDAL_KRB5_ASN1 HEIMDAL_HX509 HEIMDAL_HCRYPTO LIBNETIF LIBSAMBA-HOSTCONFIG INTL' - ) + bld.SUBDIR('../heimdal/lib/krb5/', + '''acache.c add_et_list.c + addr_families.c appdefault.c + asn1_glue.c auth_context.c + build_ap_req.c build_auth.c cache.c + changepw.c codec.c config_file.c + constants.c context.c convert_creds.c + copy_host_realm.c crc.c creds.c + crypto.c data.c eai_to_heim_errno.c + error_string.c expand_hostname.c + fcache.c free.c free_host_realm.c + generate_seq_number.c generate_subkey.c + get_addrs.c get_cred.c + get_default_principal.c + get_default_realm.c get_for_creds.c + get_host_realm.c get_in_tkt.c + get_port.c init_creds.c init_creds_pw.c + kcm.c keyblock.c keytab.c keytab_any.c + keytab_file.c keytab_memory.c + keytab_keyfile.c krbhst.c log.c + mcache.c misc.c mk_error.c mk_priv.c + mk_rep.c mk_req.c mk_req_ext.c + mit_glue.c n-fold.c padata.c pkinit.c + plugin.c principal.c prog_setup.c pac.c + prompter_posix.c rd_cred.c rd_error.c + rd_priv.c rd_rep.c rd_req.c replay.c + send_to_kdc.c set_default_realm.c + store.c store_emem.c store_fd.c + store_mem.c ticket.c time.c transited.c + v4_glue.c version.c warn.c krb5_err.c + heim_err.c k524_err.c krb_err.c''') + ' krb5-glue.c', + includes='../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/lib/com_err', + public_deps='HEIMDAL_COM_ERR', + heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h', + heimdal_autoproto_options='-E KRB5_LIB -q -P comment -o', + heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h', + deps='HEIMDAL_ROKEN HEIMDAL_PKINIT_ASN1 HEIMDAL_WIND HEIMDAL_KRB5_ASN1 HEIMDAL_HX509 HEIMDAL_HCRYPTO LIBNETIF LIBSAMBA-HOSTCONFIG INTL' + ) bld.SAMBA_SUBSYSTEM('HEIMDAL_HEIM_ASN1', @@ -320,14 +330,14 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_WIND', bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME', '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c', includes='../heimdal/lib/roken', - config_option='HAVE_GETPROGNAME' + enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME') ) bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM', '../heimdal/lib/roken/closefrom.c', includes='../heimdal/lib/roken', - config_option='HAVE_CLOSEFROM' + enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM') ) @@ -335,7 +345,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME_H', '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c', cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1', includes='../heimdal/lib/roken', - config_option='HAVE_GETPROGNAME' + enabled=not bld.CONFIG_SET('HAVE_GETPROGNAME') ) @@ -343,7 +353,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM_H', '../heimdal/lib/roken/closefrom.c', cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1', includes='../heimdal/lib/roken', - config_option='HAVE_CLOSEFROM' + enabled=not bld.CONFIG_SET('HAVE_CLOSEFROM') ) @@ -359,7 +369,7 @@ bld.SAMBA_SUBSYSTEM('HEIMDAL_COM_ERR', '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c', includes='../heimdal/lib/com_err', deps='HEIMDAL_ROKEN', - config_option='HAVE_COM_ERR' + enabled=not bld.CONFIG_SET('HAVE_COM_ERR') ) diff --git a/source4/kdc/wscript_build b/source4/kdc/wscript_build index 27272f81a5..6e35e72262 100644 --- a/source4/kdc/wscript_build +++ b/source4/kdc/wscript_build @@ -45,9 +45,10 @@ bld.SAMBA_SUBSYSTEM('MIT_SAMBA', ) -bld.SAMBA_LIBRARY('mit_samba',source='', - deps='MIT_SAMBA', - output_type='SHARED_LIBRARY', - realname='mit_samba.so' - ) +bld.SAMBA_LIBRARY('mit_samba', + source='', + deps='MIT_SAMBA', + external_library=True, + realname='mit_samba.so' + ) diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index bc5ffdbc9e..43947b4af5 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -26,29 +26,89 @@ def build(bld): bld.BUILD_SUBDIR(LIBTDB_DIR) bld.BUILD_SUBDIR(LIBTEVENT_DIR) - LDB_TDB_SRC = bld.SUBDIR('ldb_tdb', - '''ldb_tdb.c ldb_pack.c ldb_search.c ldb_index.c - ldb_cache.c ldb_tdb_wrap.c''') + # in Samba4 we build some extra modules, and add extra + # capabilities to the ldb cmdline tools + s4_build = getattr(bld.env, '_SAMBA_BUILD_', 0) == 4 LDB_MAP_SRC = bld.SUBDIR('ldb_map', 'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c') COMMON_SRC = bld.SUBDIR('common', '''ldb.c ldb_ldif.c ldb_parse.c ldb_msg.c ldb_utf8.c - ldb_debug.c ldb_modules.c ldb_dn.c ldb_match.c + ldb_debug.c ldb_dn.c ldb_match.c ldb_attributes.c attrib_handlers.c ldb_controls.c qsort.c''') - MODULES_SRC = bld.SUBDIR('modules', - 'rdn_name.c asq.c paged_results.c sort.c') + bld.SAMBA_SUBSYSTEM('LIBLDB', + includes='include', + deps='tevent', + source='common/ldb_modules.c') + + bld.SAMBA_MODULE('ldb_asq', + 'modules/asq.c', + init_function='LDB_MODULE(asq)', + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_server_sort', + 'modules/sort.c', + init_function='LDB_MODULE(server_sort)', + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_paged_results', + 'modules/paged_results.c', + init_function='LDB_MODULE(paged_results)', + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_paged_searches', + 'modules/paged_searches.c', + init_function='LDB_MODULE(paged_searches)', + enabled = s4_build, + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_rdn_name', + 'modules/rdn_name.c', + init_function='LDB_MODULE(rdn_name)', + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_sqlite3', + 'sqlite3/ldb_sqlite3.c', + init_function='LDB_BACKEND(sqlite3)', + enabled=False, + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_tdb', + bld.SUBDIR('ldb_tdb', + '''ldb_tdb.c ldb_pack.c ldb_search.c ldb_index.c + ldb_cache.c ldb_tdb_wrap.c'''), + init_function='LDB_BACKEND(tdb)', + deps='tdb', + subsystem='LIBLDB') + + bld.SAMBA_MODULE('ldb_ildap', 'ldb_ildap/ldb_ildap.c', + init_function='LDB_BACKEND(ldapi),LDB_BACKEND(ldaps),LDB_BACKEND(ldap)', + deps='talloc LIBCLI_LDAP CREDENTIALS', + enabled=s4_build, + subsystem='LIBLDB') + + ldb_deps = 'tevent LIBLDB' + if s4_build: + ldb_deps += ' LDBSAMBA POPT_CREDENTIALS POPT_SAMBA LIBCMDLINE_CREDENTIALS gensec' bld.SAMBA_LIBRARY('ldb', - LDB_TDB_SRC + ' ' + COMMON_SRC + ' ' + MODULES_SRC, - deps='tdb tevent', + COMMON_SRC + ' ' + LDB_MAP_SRC, + deps=ldb_deps, includes='include', vnum=VERSION) + bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE', + 'tools/ldbutil.c tools/cmdline.c', + 'ldb dl popt') + LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename ldbtest' for t in LDB_TOOLS.split(): - bld.SAMBA_BINARY(t, - 'tools/%s.c tools/ldbutil.c tools/cmdline.c' % t, - deps='ldb dl popt') + bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='LIBLDB_CMDLINE') + + if s4_build: + bld.SAMBA_PYTHON('pyldb', 'pyldb.c', + deps='ldb', + realname='ldb.so') + diff --git a/source4/lib/registry/wscript_build b/source4/lib/registry/wscript_build index 72478b0d7f..cd2b508144 100644 --- a/source4/lib/registry/wscript_build +++ b/source4/lib/registry/wscript_build @@ -57,7 +57,7 @@ bld.SAMBA_BINARY('regtree', bld.SAMBA_SUBSYSTEM('torture_registry', - source='tests/generic.c hive.c tests/diff.c tests/registry.c', + source='tests/generic.c tests/hive.c tests/diff.c tests/registry.c', autoproto='tests/proto.h', deps='torture registry' ) diff --git a/source4/lib/smbreadline/wscript_build b/source4/lib/smbreadline/wscript_build new file mode 100644 index 0000000000..15a746060c --- /dev/null +++ b/source4/lib/smbreadline/wscript_build @@ -0,0 +1,6 @@ + +termlib=bld.env.READLINE_TERMLIB or '' + +bld.SAMBA_SUBSYSTEM('SMBREADLINE', + source='smbreadline.c', + deps=termlib + ' readline') diff --git a/source4/lib/smbreadline/wscript_configure b/source4/lib/smbreadline/wscript_configure new file mode 100644 index 0000000000..d89c357cec --- /dev/null +++ b/source4/lib/smbreadline/wscript_configure @@ -0,0 +1,12 @@ + +conf.CHECK_HEADERS('readline.h history.h readline/readline.h readline/history.h') +for termlib in ['ncurses', 'curses', 'termcap', 'terminfo', 'termlib', 'tinfo']: + if conf.CHECK_FUNCS_IN('tgetent', termlib): + conf.env['READLINE_TERMLIB'] = termlib + break + +if conf.CHECK_FUNCS_IN('rl_completion_matches', 'readline'): + conf.DEFINE('HAVE_NEW_LIBREADLINE', 1) + +if conf.CHECK_FUNCS_IN('rl_event_hook', 'readline'): + conf.DEFINE('HAVE_HISTORY_LIST', 1) diff --git a/source4/lib/socket/wscript_build b/source4/lib/socket/wscript_build index cf75d82206..7e456a8391 100644 --- a/source4/lib/socket/wscript_build +++ b/source4/lib/socket/wscript_build @@ -13,7 +13,7 @@ bld.SAMBA_MODULE('socket_ip', source='socket_ip.c', subsystem='samba_socket', deps='LIBSAMBA-ERRORS LIBREPLACE_NETWORK', - output_type='MERGED_OBJ' + internal_module=True ) @@ -21,7 +21,7 @@ bld.SAMBA_MODULE('socket_unix', source='socket_unix.c', subsystem='samba_socket', deps='LIBREPLACE_NETWORK', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/libcli/security/wscript_build b/source4/libcli/security/wscript_build index 1b5ef77184..f2236a4a9c 100644 --- a/source4/libcli/security/wscript_build +++ b/source4/libcli/security/wscript_build @@ -3,7 +3,7 @@ bld.SAMBA_SUBSYSTEM('LIBSECURITY', - source='security_token.c access_check.c privilege.c sddl.c create_descriptor.c object_tree.c', + source='security_token.c access_check.c privilege.c create_descriptor.c object_tree.c', autoproto='proto.h', public_deps='LIBNDR LIBSECURITY_COMMON' ) diff --git a/source4/libcli/wscript_build b/source4/libcli/wscript_build index b20c52155f..bded7da4ca 100644 --- a/source4/libcli/wscript_build +++ b/source4/libcli/wscript_build @@ -54,19 +54,19 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_DGRAM', bld.SAMBA_SUBSYSTEM('LIBCLI_WREPL', source='wrepl/winsrepl.c', autoproto='wrepl/winsrepl_proto.h', - public_deps='NDR_WINSREPL samba_socket LIBEVENTS LIBPACKET' + public_deps='NDR_WINSREPL samba_socket LIBEVENTS LIBPACKET LIBSAMBA_TSOCKET' ) bld.SAMBA_SUBSYSTEM('LIBCLI_RESOLVE', source='resolve/resolve.c', autoproto='resolve/proto.h', - public_deps='NDR_NBT' + public_deps='NDR_NBT LIBTSOCKET' ) bld.SAMBA_SUBSYSTEM('LP_RESOLVE', - source='resolve/bcast.c resolve/nbtlist.c resolve/wins.c resolve/dns_ex.c resolve/host.c resolve/resolve_lp.c', + source='resolve/bcast.c resolve/nbtlist.c resolve/wins.c resolve/dns_ex.c resolve/file.c resolve/host.c resolve/resolve_lp.c', autoproto='resolve/lp_proto.h', deps='LIBCLI_NBT LIBSAMBA-HOSTCONFIG LIBNETIF' ) diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build index 225a7f172b..66d00ca544 100644 --- a/source4/librpc/wscript_build +++ b/source4/librpc/wscript_build @@ -1,5 +1,3 @@ -#! /usr/bin/env python - bld.BUILD_SUBDIR('../../librpc/idl') bld.BUILD_SUBDIR('idl') @@ -623,9 +621,8 @@ bld.SAMBA_PYTHON('python_winreg', bld.SAMBA_PYTHON('python_dcerpc_misc', - source='ndr/py_misc.c', + source='../../librpc/gen_ndr/py_misc.c', deps='PYTALLOC python_dcerpc NDR_MISC NDR_KRB5PAC', - enabled=False, realname='samba/dcerpc/misc.so' ) @@ -722,18 +719,19 @@ bld.SAMBA_PYTHON('python_drsuapi', bld.SAMBA_PYTHON('python_dcerpc_security', - source='ndr/py_security.c', + source='../../librpc/gen_ndr/py_security.c', deps='PYTALLOC python_dcerpc_misc python_dcerpc NDR_SECURITY', - enabled=False, realname='samba/dcerpc/security.so' ) bld.SAMBA_PYTHON('python_dcerpc_xattr', - source='ndr/py_xattr.c', + source='../../librpc/gen_ndr/py_xattr.c', deps='PYTALLOC python_dcerpc_misc python_dcerpc python_dcerpc_security NDR_XATTR RPC_NDR_XATTR', - enabled=False, realname='samba/dcerpc/xattr.so' ) - +bld.SAMBA_SCRIPT('python_dcerpc_init', + pattern='rpc/dcerpc.py', + installdir='python/samba/dcerpc', + installname='__init__.py') diff --git a/source4/nbt_server/wscript_build b/source4/nbt_server/wscript_build index 49e0000a13..d1928203c4 100644 --- a/source4/nbt_server/wscript_build +++ b/source4/nbt_server/wscript_build @@ -11,7 +11,7 @@ bld.SAMBA_SUBSYSTEM('WINSDB', bld.SAMBA_MODULE('ldb_wins_ldb', source='wins/wins_ldb.c', - subsystem='ldb', + subsystem='LIBLDB', init_function='LDB_MODULE(wins_ldb)', deps='ldb LIBNETIF LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL' ) diff --git a/source4/ntvfs/posix/wscript_build b/source4/ntvfs/posix/wscript_build index 3336950974..070c2fb8f6 100644 --- a/source4/ntvfs/posix/wscript_build +++ b/source4/ntvfs/posix/wscript_build @@ -28,25 +28,25 @@ bld.SAMBA_SUBSYSTEM('pvfs_aio', bld.SAMBA_MODULE('ntvfs_posix', - source='vfs_posix.c pvfs_util.c pvfs_search.c pvfs_dirlist.c pvfs_fileinfo.c pvfs_unlink.c pvfs_mkdir.c pvfs_open.c pvfs_read.c pvfs_flush.c pvfs_write.c pvfs_fsinfo.c pvfs_qfileinfo.c pvfs_setfileinfo.c pvfs_rename.c pvfs_resolve.c pvfs_shortname.c pvfs_lock.c pvfs_oplock.c pvfs_wait.c pvfs_seek.c pvfs_ioctl.c pvfs_xattr.c pvfs_streams.c pvfs_notify.c xattr_system.c xattr_tdb.c', + source='vfs_posix.c pvfs_util.c pvfs_search.c pvfs_dirlist.c pvfs_fileinfo.c pvfs_unlink.c pvfs_mkdir.c pvfs_open.c pvfs_read.c pvfs_flush.c pvfs_write.c pvfs_fsinfo.c pvfs_qfileinfo.c pvfs_setfileinfo.c pvfs_rename.c pvfs_resolve.c pvfs_shortname.c pvfs_lock.c pvfs_oplock.c pvfs_wait.c pvfs_seek.c pvfs_ioctl.c pvfs_xattr.c pvfs_streams.c pvfs_notify.c pvfs_sys.c xattr_system.c xattr_tdb.c', autoproto='vfs_posix_proto.h', subsystem='ntvfs', init_function='ntvfs_posix_init', deps='NDR_XATTR WRAP_XATTR BLKID ntvfs_common MESSAGING LIBWBCLIENT_OLD pvfs_acl pvfs_aio', - output_type='MERGED_OBJ' + internal_module=True ) bld.SAMBA_PYTHON('python_xattr_native', source='python/pyxattr_native.c', - deps='LIBNDR ldb SAMDB CREDENTIALS python_dcerpc_security pyparam_util WRAP_XATTR', + deps='LIBNDR ldb SAMDB CREDENTIALS python_dcerpc_security pyparam_util WRAP_XATTR attr', realname='samba/xattr_native.so' ) bld.SAMBA_PYTHON('python_xattr_tdb', source='python/pyxattr_tdb.c xattr_tdb.c', - deps='LIBNDR ldb python_dcerpc_security pyparam_util share', + deps='LIBNDR ldb python_dcerpc_security pyparam_util share attr', realname='samba/xattr_tdb.so' ) diff --git a/source4/ntvfs/wscript_build b/source4/ntvfs/wscript_build index c806720860..7b4c10d8cc 100644 --- a/source4/ntvfs/wscript_build +++ b/source4/ntvfs/wscript_build @@ -23,7 +23,7 @@ bld.SAMBA_MODULE('ntvfs_smb2', bld.SAMBA_MODULE('ntvfs_simple', - source='simple/vfs_simple.c cifs_posix_cli/svfs_util.c ./simple/svfs_util.c', + source='simple/vfs_simple.c simple/svfs_util.c', autoproto='simple/proto.h', subsystem='ntvfs', init_function='ntvfs_simple_init' @@ -31,7 +31,7 @@ bld.SAMBA_MODULE('ntvfs_simple', bld.SAMBA_MODULE('ntvfs_cifsposix', - source='cifs_posix_cli/vfs_cifs_posix.c cifs_posix_cli/svfs_util.c ./simple/svfs_util.c', + source='cifs_posix_cli/vfs_cifs_posix.c cifs_posix_cli/svfs_util.c', autoproto='cifs_posix_cli/proto.h', subsystem='ntvfs', init_function='ntvfs_cifs_posix_init' diff --git a/source4/param/wscript_build b/source4/param/wscript_build index 7e653f35d0..ea1bfc6e3e 100644 --- a/source4/param/wscript_build +++ b/source4/param/wscript_build @@ -1,12 +1,8 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/param/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_LIBRARY('LIBSAMBA-HOSTCONFIG', source='loadparm.c generic.c util.c', # PC_FILES='samba-hostconfig.pc', vnum='0.0.1', - deps='DYNCONFIG LIBREPLACE_EXT CHARSET', + deps='DYNCONFIG LIBREPLACE_EXT CHARSET dl', public_deps='LIBSAMBA-UTIL', public_headers='param.h' ) diff --git a/source4/rpc_server/wscript_build b/source4/rpc_server/wscript_build index fc1d43d549..6a871ab903 100644 --- a/source4/rpc_server/wscript_build +++ b/source4/rpc_server/wscript_build @@ -73,7 +73,7 @@ bld.SAMBA_MODULE('dcerpc_winreg', subsystem='dcerpc_server', init_function='dcerpc_server_winreg_init', deps='registry NDR_STANDARD', - output_type='MERGED_OBJ' + internal_module=True ) @@ -99,7 +99,7 @@ bld.SAMBA_MODULE('dcerpc_spoolss', subsystem='dcerpc_server', init_function='dcerpc_server_spoolss_init', deps='DCERPC_COMMON NDR_SPOOLSS ntptr RPC_NDR_SPOOLSS', - output_type='MERGED_OBJ' + internal_module=True ) @@ -132,7 +132,7 @@ bld.SAMBA_MODULE('DCESRV', autoproto='service_rpc.h', subsystem='service', init_function='server_service_rpc_init', - output_type='MERGED_OBJ', + internal_module=True, deps='dcerpc_server' ) diff --git a/source4/scripting/python/wscript_build b/source4/scripting/python/wscript_build index 91bd516408..cfa028f4a4 100644 --- a/source4/scripting/python/wscript_build +++ b/source4/scripting/python/wscript_build @@ -15,7 +15,7 @@ bld.SAMBA_PYTHON('PYTALLOC', bld.SAMBA_PYTHON('python_uuid', source='uuidmodule.c', deps='LIBNDR', - realname='uuid' + realname='uuid.so' ) @@ -30,3 +30,9 @@ bld.SAMBA_PYTHON('python_glue', # create a dummy subsystem for EXT_LIB_PYTHON bld.SAMBA_SUBSYSTEM('EXT_LIB_PYTHON', '') + + +# install out various python scripts for use by make test +bld.SAMBA_SCRIPT('samba_python', + pattern='samba/**/*.py', + installdir='python') diff --git a/source4/selftest/wscript b/source4/selftest/wscript index 8327838366..d271ce783c 100644 --- a/source4/selftest/wscript +++ b/source4/selftest/wscript @@ -1,5 +1,7 @@ # selftest main code. +import Scripting, os + ######################################################################## # main test entry point def cmd_test(opt): @@ -11,8 +13,10 @@ def cmd_test(opt): def cmd_quicktest(opt): '''Run the quick test suite''' print "Starting quick test" + #Scripting.commands += ['build'] + SELFTEST = 'PYTHON=/usr/bin/python perl -W ../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="./selftest/tests.sh|" --exclude=./selftest/slow --quick --include=./selftest/quick --socket-wrapper | perl -W ../selftest/filter-subunit.pl --expected-failures=./selftest/knownfail | /usr/bin/perl -W ../selftest/format-subunit.pl --prefix=./st --format=plain --immediate' + ret = os.system(SELFTEST) def set_options(opt): opt.ADD_COMMAND('test', cmd_test) opt.ADD_COMMAND('quicktest', cmd_quicktest) - diff --git a/source4/smb_server/wscript_build b/source4/smb_server/wscript_build index cccb285b5d..689ff94f20 100644 --- a/source4/smb_server/wscript_build +++ b/source4/smb_server/wscript_build @@ -8,7 +8,7 @@ bld.SAMBA_MODULE('SERVICE_SMB', subsystem='service', init_function='server_service_smb_init', deps='SMB_SERVER', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/smbd/wscript_build b/source4/smbd/wscript_build index ba2f081678..89362c8892 100644 --- a/source4/smbd/wscript_build +++ b/source4/smbd/wscript_build @@ -19,9 +19,10 @@ bld.SAMBA_BINARY('samba', source='server.c', manpages='samba.8', installdir='SBINDIR', - subsystem='service', + subsystem_name='service', deps='''LIBEVENTS process_model service LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL POPT_SAMBA PIDFILE - LIBPOPT gensec registry ntptr ntvfs share CLUSTER DCESRV''' + LIBPOPT gensec registry ntptr ntvfs share CLUSTER DCESRV''', + needs_python=True ) @@ -35,7 +36,7 @@ bld.SAMBA_MODULE('process_model_single', source='process_single.c', subsystem='process_model', init_function='process_model_single_init', - output_type='MERGED_OBJ' + internal_module=True ) @@ -51,7 +52,8 @@ bld.SAMBA_MODULE('process_model_thread', source='process_thread.c', subsystem='process_model', init_function='process_model_thread_init', - deps='PTHREAD' + enabled=False, + deps='pthread' ) diff --git a/source4/torture/drs/wscript_build b/source4/torture/drs/wscript_build index 2743b7c2ad..4008ac9a41 100644 --- a/source4/torture/drs/wscript_build +++ b/source4/torture/drs/wscript_build @@ -8,6 +8,6 @@ bld.SAMBA_MODULE('TORTURE_DRS', subsystem='smbtorture', init_function='torture_drs_init', deps='NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/torture/libnetapi/wscript_build b/source4/torture/libnetapi/wscript_build index 5110cf54ce..bea5f06f9e 100644 --- a/source4/torture/libnetapi/wscript_build +++ b/source4/torture/libnetapi/wscript_build @@ -8,7 +8,7 @@ bld.SAMBA_MODULE('TORTURE_LIBNETAPI', subsystem='smbtorture', init_function='torture_libnetapi_init', deps='POPT_CREDENTIALS NETAPI', - output_type='MERGED_OBJ', + internal_module=True, enabled=False ) diff --git a/source4/torture/libsmbclient/wscript_build b/source4/torture/libsmbclient/wscript_build index 688e0a9533..6fd5e8d7a3 100644 --- a/source4/torture/libsmbclient/wscript_build +++ b/source4/torture/libsmbclient/wscript_build @@ -8,7 +8,7 @@ bld.SAMBA_MODULE('TORTURE_LIBSMBCLIENT', subsystem='smbtorture', init_function='torture_libsmbclient_init', deps='POPT_CREDENTIALS SMBCLIENT', - output_type='MERGED_OBJ', + internal_module=True, enabled=False ) diff --git a/source4/torture/local/wscript_build b/source4/torture/local/wscript_build index f930a432cb..785101ed79 100644 --- a/source4/torture/local/wscript_build +++ b/source4/torture/local/wscript_build @@ -3,6 +3,6 @@ bld.SAMBA_MODULE('TORTURE_LOCAL', autoproto='proto.h', subsystem='smbtorture', init_function='torture_local_init', - deps='RPC_NDR_ECHO TDR LIBCLI_SMB MESSAGING ICONV POPT_CREDENTIALS TORTURE_AUTH TORTURE_UTIL TORTURE_NDR TORTURE_LIBCRYPTO share torture_registry PROVISION NSS_WRAPPER ldb SAMDB', - output_type='MERGED_OBJ' + deps='RPC_NDR_ECHO TDR LIBCLI_SMB MESSAGING ICONV POPT_CREDENTIALS TORTURE_AUTH TORTURE_UTIL TORTURE_NDR TORTURE_LIBCRYPTO share torture_registry PROVISION NSS_WRAPPER ldb SAMDB SOCKET_WRAPPER', + internal_module=True ) diff --git a/source4/torture/smb2/wscript_build b/source4/torture/smb2/wscript_build index 542ebf4f4a..7d4f48813c 100644 --- a/source4/torture/smb2/wscript_build +++ b/source4/torture/smb2/wscript_build @@ -6,7 +6,7 @@ bld.SAMBA_MODULE('TORTURE_SMB2', source='connect.c scan.c util.c getinfo.c setinfo.c lock.c notify.c smb2.c durable_open.c oplock.c dir.c lease.c create.c acls.c read.c compound.c streams.c', subsystem='smbtorture', deps='LIBCLI_SMB2 POPT_CREDENTIALS torture', - output_type='MERGED_OBJ', + internal_module=True, autoproto='proto.h', init_function='torture_smb2_init' ) diff --git a/source4/torture/winbind/wscript_build b/source4/torture/winbind/wscript_build index 82bf44fb2a..4345b7bd0b 100644 --- a/source4/torture/winbind/wscript_build +++ b/source4/torture/winbind/wscript_build @@ -4,5 +4,5 @@ bld.SAMBA_MODULE('TORTURE_WINBIND', subsystem='smbtorture', init_function='torture_winbind_init', deps='LIBWBCLIENT LIBWBCLIENT_ASYNC LIBWINBIND-CLIENT torture PAM_ERRORS', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/torture/wscript_build b/source4/torture/wscript_build index 5be7385e5d..489d3300ae 100644 --- a/source4/torture/wscript_build +++ b/source4/torture/wscript_build @@ -10,22 +10,22 @@ bld.SAMBA_SUBSYSTEM('TORTURE_UTIL', bld.SAMBA_MODULE('TORTURE_BASIC', - source='basic/base.c basic/misc.c basic/scanner.c ./rpc/scanner.c basic/utable.c basic/charset.c basic/mangle_test.c basic/denytest.c basic/aliases.c basic/locking.c basic/secleak.c raw/rename.c ./basic/rename.c basic/dir.c ./smb2/dir.c basic/delete.c raw/unlink.c ./basic/unlink.c basic/disconnect.c basic/delaywrite.c basic/attr.c basic/properties.c', + source='basic/base.c basic/misc.c basic/scanner.c basic/utable.c basic/charset.c basic/mangle_test.c basic/denytest.c basic/aliases.c basic/locking.c basic/secleak.c basic/rename.c basic/dir.c basic/delete.c basic/unlink.c basic/disconnect.c basic/delaywrite.c basic/attr.c basic/properties.c', subsystem='smbtorture', deps='LIBCLI_SMB POPT_CREDENTIALS TORTURE_UTIL LIBCLI_RAW TORTURE_RAW', - output_type='MERGED_OBJ', + internal_module=True, autoproto='basic/proto.h', init_function='torture_base_init' ) bld.SAMBA_MODULE('TORTURE_RAW', - source='raw/qfsinfo.c raw/qfileinfo.c raw/setfileinfo.c raw/search.c raw/close.c raw/open.c raw/mkdir.c raw/oplock.c ./smb2/oplock.c raw/notify.c ./smb2/notify.c raw/mux.c raw/ioctl.c raw/chkpath.c raw/unlink.c ./basic/unlink.c raw/read.c ./smb2/read.c raw/context.c raw/write.c raw/lock.c ./smb2/lock.c raw/pingpong.c raw/lockbench.c raw/lookuprate.c raw/tconrate.c raw/openbench.c raw/rename.c ./basic/rename.c raw/eas.c raw/streams.c ./smb2/streams.c raw/acls.c ./smb2/acls.c raw/seek.c raw/samba3hide.c raw/samba3misc.c raw/composite.c raw/raw.c raw/offline.c', + source='raw/qfsinfo.c raw/qfileinfo.c raw/setfileinfo.c raw/search.c raw/close.c raw/open.c raw/mkdir.c raw/oplock.c raw/notify.c raw/mux.c raw/ioctl.c raw/chkpath.c raw/unlink.c raw/read.c raw/context.c raw/write.c raw/lock.c raw/pingpong.c raw/lockbench.c raw/lookuprate.c raw/tconrate.c raw/openbench.c raw/rename.c raw/eas.c raw/streams.c raw/acls.c raw/seek.c raw/samba3hide.c raw/samba3misc.c raw/composite.c raw/raw.c raw/offline.c', autoproto='raw/proto.h', subsystem='smbtorture', init_function='torture_raw_init', deps='LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE POPT_CREDENTIALS TORTURE_UTIL', - output_type='MERGED_OBJ' + internal_module=True ) bld.BUILD_SUBDIR('smb2') @@ -34,19 +34,19 @@ bld.BUILD_SUBDIR('libnetapi') bld.BUILD_SUBDIR('libsmbclient') bld.SAMBA_SUBSYSTEM('TORTURE_NDR', - source='ndr/ndr.c ndr/winreg.c ./rpc/winreg.c ndr/atsvc.c ./rpc/atsvc.c ndr/lsa.c ./rpc/lsa.c ndr/epmap.c ndr/dfs.c ./rpc/dfs.c ndr/netlogon.c ./rpc/netlogon.c ndr/drsuapi.c ./rpc/drsuapi.c ndr/spoolss.c ./rpc/spoolss.c ndr/samr.c ./rpc/samr.c ndr/dfsblob.c', + source='ndr/ndr.c ndr/winreg.c ndr/atsvc.c ndr/lsa.c ndr/epmap.c ndr/dfs.c ndr/netlogon.c ndr/drsuapi.c ndr/spoolss.c ndr/samr.c ndr/dfsblob.c', autoproto='ndr/proto.h', deps='torture SERVICE_SMB' ) bld.SAMBA_MODULE('torture_rpc', - source='rpc/join.c ndr/lsa.c ./rpc/lsa.c rpc/lsa_lookup.c rpc/session_key.c rpc/echo.c ndr/dfs.c ./rpc/dfs.c ndr/drsuapi.c ./rpc/drsuapi.c rpc/drsuapi_cracknames.c rpc/dssync.c rpc/dsgetinfo.c ndr/spoolss.c ./rpc/spoolss.c rpc/spoolss_notify.c rpc/spoolss_win.c rpc/unixinfo.c ndr/samr.c ./rpc/samr.c rpc/samr_accessmask.c rpc/wkssvc.c rpc/srvsvc.c rpc/svcctl.c ndr/atsvc.c ./rpc/atsvc.c rpc/eventlog.c rpc/epmapper.c ndr/winreg.c ./rpc/winreg.c rpc/initshutdown.c rpc/oxidresolve.c rpc/remact.c rpc/mgmt.c basic/scanner.c ./rpc/scanner.c rpc/autoidl.c rpc/countcalls.c rpc/testjoin.c rpc/schannel.c ndr/netlogon.c ./rpc/netlogon.c rpc/remote_pac.c rpc/samlogon.c rpc/samsync.c rpc/bind.c rpc/dssetup.c rpc/alter_context.c rpc/bench.c rpc/samba3rpc.c rpc/rpc.c rpc/async_bind.c rpc/handles.c rpc/frsapi.c rpc/object_uuid.c rpc/ntsvcs.c rpc/browser.c', + source='rpc/join.c rpc/lsa.c rpc/lsa_lookup.c rpc/session_key.c rpc/echo.c rpc/dfs.c rpc/drsuapi.c rpc/drsuapi_cracknames.c rpc/dssync.c rpc/dsgetinfo.c rpc/spoolss.c rpc/spoolss_notify.c rpc/spoolss_win.c rpc/unixinfo.c rpc/samr.c rpc/samr_accessmask.c rpc/wkssvc.c rpc/srvsvc.c rpc/svcctl.c rpc/atsvc.c rpc/eventlog.c rpc/epmapper.c rpc/winreg.c rpc/initshutdown.c rpc/oxidresolve.c rpc/remact.c rpc/mgmt.c rpc/scanner.c rpc/autoidl.c rpc/countcalls.c rpc/testjoin.c rpc/schannel.c rpc/netlogon.c rpc/remote_pac.c rpc/samlogon.c rpc/samsync.c rpc/bind.c rpc/dssetup.c rpc/alter_context.c rpc/bench.c rpc/samba3rpc.c rpc/rpc.c rpc/async_bind.c rpc/handles.c rpc/frsapi.c rpc/object_uuid.c rpc/ntsvcs.c rpc/browser.c', autoproto='rpc/proto.h', subsystem='smbtorture', init_function='torture_rpc_init', deps='NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE', - output_type='MERGED_OBJ' + internal_module=True ) bld.BUILD_SUBDIR('drs') @@ -57,7 +57,7 @@ bld.SAMBA_MODULE('TORTURE_RAP', subsystem='smbtorture', init_function='torture_rap_init', deps='TORTURE_UTIL LIBCLI_SMB', - output_type='MERGED_OBJ' + internal_module=True ) @@ -66,7 +66,7 @@ bld.SAMBA_MODULE('TORTURE_AUTH', autoproto='auth/proto.h', subsystem='smbtorture', deps='LIBCLI_SMB gensec auth KERBEROS POPT_CREDENTIALS SMBPASSWD torture', - output_type='MERGED_OBJ' + internal_module=True ) bld.BUILD_SUBDIR('local') @@ -77,7 +77,7 @@ bld.SAMBA_MODULE('TORTURE_NBENCH', subsystem='smbtorture', init_function='torture_nbench_init', deps='TORTURE_UTIL', - output_type='MERGED_OBJ' + internal_module=True ) @@ -87,7 +87,7 @@ bld.SAMBA_MODULE('TORTURE_UNIX', subsystem='smbtorture', init_function='torture_unix_init', deps='TORTURE_UTIL', - output_type='MERGED_OBJ' + internal_module=True ) @@ -95,7 +95,7 @@ bld.SAMBA_MODULE('TORTURE_LDAP', source='ldap/common.c ldap/basic.c ldap/schema.c ldap/uptodatevector.c ldap/cldap.c ldap/cldapbench.c ldap/ldap_sort.c ldap/nested_search.c', subsystem='smbtorture', deps='LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture LDB_WRAP', - output_type='MERGED_OBJ', + internal_module=True, autoproto='ldap/proto.h', init_function='torture_ldap_init' ) @@ -107,7 +107,7 @@ bld.SAMBA_MODULE('TORTURE_NBT', subsystem='smbtorture', init_function='torture_nbt_init', deps='LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc', - output_type='MERGED_OBJ' + internal_module=True ) @@ -117,7 +117,7 @@ bld.SAMBA_MODULE('TORTURE_NET', subsystem='smbtorture', init_function='torture_net_init', deps='LIBSAMBA-NET POPT_CREDENTIALS torture_rpc PROVISION', - output_type='MERGED_OBJ' + internal_module=True ) @@ -127,18 +127,18 @@ bld.SAMBA_MODULE('TORTURE_NTP', subsystem='smbtorture', init_function='torture_ntp_init', deps='POPT_CREDENTIALS torture_rpc', - output_type='MERGED_OBJ' + internal_module=True ) -TORTURE_MODULES = 'TORTURE_BASIC TORTURE_RAW torture_rpc TORTURE_RAP TORTURE_AUTH TORTURE_NBENCH TORTURE_UNIX TORTURE_LDAP TORTURE_NBT TORTURE_NET TORTURE_NTP' +TORTURE_MODULES = 'TORTURE_BASIC TORTURE_RAW torture_rpc TORTURE_RAP TORTURE_AUTH TORTURE_NBENCH TORTURE_UNIX TORTURE_LDAP TORTURE_NBT TORTURE_NET TORTURE_NTP torture_registry' bld.SAMBA_BINARY('smbtorture', source='smbtorture.c torture.c', manpages='man/smbtorture.1', public_headers='smbtorture.h', installdir='BINDIR', - subsystem='smbtorture', - deps='torture LIBPOPT POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES + deps='torture LIBPOPT POPT_SAMBA POPT_CREDENTIALS dcerpc LIBCLI_SMB SMBREADLINE ' + TORTURE_MODULES, + needs_python=True ) @@ -161,11 +161,11 @@ bld.SAMBA_BINARY('masktest', bld.SAMBA_BINARY('locktest', source='locktest.c', # COV_TARGET='test', - ldflags='--coverage', - manpages='man/locktest.1', + #ldflags='--coverage', + #cflags='--coverage', # GCOV='1', + manpages='man/locktest.1', deps='LIBPOPT POPT_SAMBA POPT_CREDENTIALS LIBSAMBA-UTIL LIBCLI_SMB LIBSAMBA-HOSTCONFIG', - cflags='--coverage', installdir='BINDIR' ) diff --git a/source4/utils/net/wscript_build b/source4/utils/net/wscript_build index 47b0f21425..ef31d0c3d3 100644 --- a/source4/utils/net/wscript_build +++ b/source4/utils/net/wscript_build @@ -1,13 +1,9 @@ -# AUTOGENERATED by mktowscript.pl from ../../source4/utils/net/config.mk -# Please remove this notice if hand editing - - bld.SAMBA_MODULE('net_drs', source='drs/net_drs.c drs/net_drs_bind.c drs/net_drs_kcc.c drs/net_drs_replicate.c drs/net_drs_showrepl.c', autoproto='drs/net_drs_proto.h', subsystem='net', deps='LIBCLI_DRSUAPI ldb', - output_type='MERGED_OBJ' + internal_module=True ) diff --git a/source4/utils/wscript_build b/source4/utils/wscript_build index c11c49abc3..4dde99e2f7 100644 --- a/source4/utils/wscript_build +++ b/source4/utils/wscript_build @@ -6,7 +6,8 @@ bld.SAMBA_BINARY('ntlm_auth', source='ntlm_auth.c', manpages='man/ntlm_auth.1', installdir='BINDIR', - deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS gensec LIBCLI_RESOLVE auth ntlm_check MESSAGING LIBEVENTS' + deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL LIBPOPT POPT_SAMBA POPT_CREDENTIALS gensec LIBCLI_RESOLVE auth ntlm_check MESSAGING LIBEVENTS service', + needs_python=True ) diff --git a/source4/winbind/wscript_build b/source4/winbind/wscript_build index 3a62c13ea4..e0c44c35d1 100644 --- a/source4/winbind/wscript_build +++ b/source4/winbind/wscript_build @@ -3,7 +3,7 @@ bld.SAMBA_MODULE('WINBIND', - source='wb_server.c wb_irpc.c wb_samba3_protocol.c wb_samba3_cmd.c wb_init_domain.c wb_dom_info.c wb_dom_info_trusted.c wb_sid2domain.c wb_name2domain.c wb_sids2xids.c wb_xids2sids.c wb_gid2sid.c wb_sid2uid.c wb_sid2gid.c wb_uid2sid.c wb_connect_lsa.c wb_connect_sam.c wb_cmd_lookupname.c wb_cmd_lookupsid.c wb_cmd_getdcname.c wb_cmd_getgrnam.c wb_cmd_getgrgid.c wb_cmd_getpwnam.c wb_cmd_getpwuid.c wb_cmd_userdomgroups.c wb_cmd_usersids.c wb_cmd_list_groups.c wb_cmd_list_trustdom.c wb_cmd_list_users.c wb_cmd_setpwent.c wb_cmd_getpwent.c wb_pam_auth.c wb_sam_logon.c', + source='wb_server.c wb_irpc.c wb_samba3_protocol.c wb_samba3_cmd.c wb_init_domain.c wb_dom_info.c wb_dom_info_trusted.c wb_sid2domain.c wb_name2domain.c wb_sids2xids.c wb_xids2sids.c wb_gid2sid.c wb_sid2uid.c wb_sid2gid.c wb_uid2sid.c wb_connect_lsa.c wb_connect_sam.c wb_cmd_lookupname.c wb_cmd_lookupsid.c wb_cmd_getdcname.c wb_cmd_getgrnam.c wb_cmd_getgrgid.c wb_cmd_getpwnam.c wb_cmd_getpwuid.c wb_cmd_userdomgroups.c wb_cmd_usersids.c wb_cmd_list_groups.c wb_cmd_list_trustdom.c wb_cmd_list_users.c wb_cmd_setpwent.c wb_cmd_getpwent.c wb_cmd_getgrent.c wb_cmd_setgrent.c wb_cmd_getgroups.c wb_pam_auth.c wb_sam_logon.c', autoproto='wb_proto.h', subsystem='service', init_function='server_service_winbind_init', diff --git a/source4/wscript b/source4/wscript index 31bc3070d0..aecea2df5f 100644 --- a/source4/wscript +++ b/source4/wscript @@ -35,10 +35,7 @@ def configure(conf): # set a lower limit on recursing in waf preprocessor conf.env.preprocessor_recursion_limit = 10 - # we should use the PIC options in waf instead - conf.ADD_CFLAGS('-fPIC') - - conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include #lib/replace #lib/talloc') + conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include #lib/replace #lib/talloc #lib/tevent') conf.sub_config('../lib/replace') @@ -63,5 +60,6 @@ def configure(conf): conf.sub_config('../lib/nss_wrapper') conf.sub_config('../lib/socket_wrapper') conf.sub_config('../lib/uid_wrapper') + conf.sub_config('lib/smbreadline') conf.SAMBA_CONFIG_H('include/config.h') diff --git a/source4/wscript_build b/source4/wscript_build index a924dad2ee..8d3b670e02 100644 --- a/source4/wscript_build +++ b/source4/wscript_build @@ -3,8 +3,6 @@ import os srcdir = ".." -bld.env.TOPDIR = os.path.normpath(os.path.join(os.environ.get('PWD'), srcdir)) - # create separate build groups for building the asn1 and et compiler, then # building the C from ASN1 and IDL, and finally the main build process bld.SETUP_BUILD_GROUPS() @@ -16,29 +14,25 @@ bld.SAMBA_MKVERSION('version.h') bld.TARGET_ALIAS('attr', 'XATTR') bld.TARGET_ALIAS('execinfo', 'EXECINFO') bld.TARGET_ALIAS('popt', 'LIBPOPT') +bld.TARGET_ALIAS('tevent', 'LIBTEVENT_EXT') +bld.TARGET_ALIAS('z', 'ZLIB') +bld.TARGET_ALIAS('pam', 'PAM') +bld.TARGET_ALIAS('sasl2', 'SASL') +bld.TARGET_ALIAS('crypt', 'CRYPT') # missing subsystems bld.SAMBA_SUBSYSTEM('pyldb_util', '') -bld.SAMBA_SUBSYSTEM('pyldb', '') bld.SAMBA_SUBSYSTEM('dcerpc_mgmt', '') bld.SAMBA_SUBSYSTEM('TORTURE_LDB_MODULE', '') bld.SAMBA_SUBSYSTEM('INTL', '') bld.SAMBA_SUBSYSTEM('NDR_SAMR', '') -bld.SAMBA_SUBSYSTEM('LIBLDB_CMDLINE', '') bld.SAMBA_SUBSYSTEM('NETAPI', '') bld.SAMBA_SUBSYSTEM('HDB_LDB', '') -bld.SAMBA_SUBSYSTEM('SMBREADLINE', '') bld.SAMBA_SUBSYSTEM('OPENPTY', '') bld.SAMBA_SUBSYSTEM('SMBCLIENT', '') bld.SAMBA_SUBSYSTEM('BLKID', '') -bld.SAMBA_SUBSYSTEM('LIBTEVENT_EXT', '') -bld.SAMBA_SUBSYSTEM('PTHREAD', '') -bld.SAMBA_SUBSYSTEM('CRYPT', '') -bld.SAMBA_SUBSYSTEM('PAM', '') -bld.SAMBA_SUBSYSTEM('SASL', '') bld.SAMBA_SUBSYSTEM('smbcalls', '') bld.SAMBA_SUBSYSTEM('SETPROCTITLE', '') -bld.SAMBA_SUBSYSTEM('ZLIB', '') bld.SAMBA_SUBSYSTEM('NDR_SRVSVC', '') bld.SAMBA_SUBSYSTEM('ICONV', '') bld.SAMBA_SUBSYSTEM('NDR_MISC', '') @@ -54,6 +48,7 @@ bld.BUILD_SUBDIR('lib/ldb') bld.BUILD_SUBDIR('dynconfig') bld.BUILD_SUBDIR('../lib/util/charset') bld.BUILD_SUBDIR('scripting/python') +bld.BUILD_SUBDIR('../lib/subunit/python') bld.BUILD_SUBDIR('param') bld.BUILD_SUBDIR('librpc') bld.BUILD_SUBDIR('dsdb') @@ -114,6 +109,7 @@ bld.BUILD_SUBDIR('../libcli/samsync') bld.BUILD_SUBDIR('../libgpo') bld.BUILD_SUBDIR('../libcli/named_pipe_auth') bld.BUILD_SUBDIR('heimdal_build') +bld.BUILD_SUBDIR('lib/smbreadline') bld.ENFORCE_GROUP_ORDERING() -bld.CHECK_ORPANED_TARGETS() + -- cgit