s4-waf: move to a universal method of recursing into subdirs
authorAndrew Tridgell <tridge@samba.org>
Sun, 4 Apr 2010 03:08:05 +0000 (13:08 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:25 +0000 (20:27 +1000)
This works with both standalone lib builds and bundled builds

20 files changed:
buildtools/wafsamba/samba_utils.py
buildtools/wafsamba/wafsamba.py
lib/replace/wscript
lib/talloc/wscript
lib/tdb/wscript
lib/tevent/wscript
librpc/wscript_build
pidl/wscript
source3/wscript
source3/wscript_build
source4/auth/wscript_build
source4/dsdb/wscript_build
source4/lib/ldb/wscript
source4/libcli/wscript_build
source4/librpc/wscript_build
source4/ntvfs/wscript_build
source4/smb_server/wscript_build
source4/torture/wscript_build
source4/wscript
source4/wscript_build

index 07a37aa9e7be87e29cdfff1b3497618f04a07292..37b3fc9dbbc9041b9d054479b715030caf3c5506 100644 (file)
@@ -418,3 +418,35 @@ def TOUCH_FILE(file, install_dir=False):
     mkdir_p(os.path.dirname(file))
     f = open(file, 'w')
     f.close()
     mkdir_p(os.path.dirname(file))
     f = open(file, 'w')
     f.close()
+
+
+
+@conf
+def RECURSE(ctx, directory):
+    '''recurse into a directory, relative to the curdir or top level'''
+    try:
+        visited_dirs = ctx.visited_dirs
+    except:
+        visited_dirs = ctx.visited_dirs = set()
+    d = os.path.join(ctx.curdir, directory)
+    if os.path.exists(d):
+        abspath = os.path.abspath(d)
+    else:
+        abspath = os.path.abspath(os.path.join(Utils.g_module.srcdir, directory))
+    ctxclass = ctx.__class__.__name__
+    key = ctxclass + ':' + abspath
+    if key in visited_dirs:
+        # already done it
+        return
+    visited_dirs.add(key)
+    relpath = os_path_relpath(abspath, ctx.curdir)
+    if ctxclass == 'Handler':
+        return ctx.sub_options(relpath)
+    if ctxclass == 'ConfigurationContext':
+        return ctx.sub_config(relpath)
+    if ctxclass == 'BuildContext':
+        return ctx.add_subdirs(relpath)
+    print 'Unknown RECURSE context class', ctxclass
+    raise
+Options.Handler.RECURSE = RECURSE
+Build.BuildContext.RECURSE = RECURSE
index f9cb1a882fded206a26446c77d3212ebb40c96f4..55dfe26b0a465bbe474eff2b27c2ce50686574f0 100644 (file)
@@ -442,18 +442,6 @@ Build.BuildContext.SAMBA_GENERATOR = SAMBA_GENERATOR
 
 
 
 
 
 
-def BUILD_SUBDIR(bld, dir):
-    '''add a new set of build rules from a subdirectory'''
-    path = os.path.normpath(bld.curdir + '/' + dir)
-    cache = LOCAL_CACHE(bld, 'SUBDIR_LIST')
-    if path in cache: return
-    cache[path] = True
-    debug("build: Processing subdirectory %s" % dir)
-    bld.add_subdirs(dir)
-Build.BuildContext.BUILD_SUBDIR = BUILD_SUBDIR
-
-
-
 @runonce
 def SETUP_BUILD_GROUPS(bld):
     '''setup build groups used to ensure that the different build
 @runonce
 def SETUP_BUILD_GROUPS(bld):
     '''setup build groups used to ensure that the different build
index af70c47a248eff06fd5228f5f9a9838770f49ee9..70475c4f29ec206f9ca83bb1fb7d669d8699afcf 100644 (file)
@@ -8,12 +8,10 @@ blddir = 'bin'
 import sys, os, Utils
 
 # find the buildtools directory
 import sys, os, Utils
 
 # find the buildtools directory
-buildtools = 'buildtools'
-while not os.path.exists(buildtools) and len(buildtools.split('/')) < 5:
-    buildtools = '../' + buildtools
-srcdir = os.path.dirname(buildtools) or '.'
-
-sys.path.insert(0, buildtools + "/wafsamba")
+srcdir = '.'
+while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
+    srcdir = '../' + srcdir
+sys.path.insert(0, srcdir + '/buildtools/wafsamba')
 
 import wafsamba, samba_dist
 import Options, os, preproc
 
 import wafsamba, samba_dist
 import Options, os, preproc
@@ -23,11 +21,11 @@ samba_dist.DIST_DIRS('lib/replace buildtools:buildtools')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('')
-    opt.recurse('../../buildtools/wafsamba')
+    opt.RECURSE('buildtools/wafsamba')
 
 @wafsamba.runonce
 def configure(conf):
 
 @wafsamba.runonce
 def configure(conf):
-    conf.sub_config('../../buildtools/wafsamba')
+    conf.RECURSE('buildtools/wafsamba')
 
     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
 
 
     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
 
@@ -290,12 +288,12 @@ def configure(conf):
                     define='REPLACE_GETPASS',
                     cflags='-DNO_CONFIG_H')
 
                     define='REPLACE_GETPASS',
                     cflags='-DNO_CONFIG_H')
 
-    conf.sub_config('system')
+    conf.RECURSE('system')
     conf.SAMBA_CONFIG_H()
 
 
 def build(bld):
     conf.SAMBA_CONFIG_H()
 
 
 def build(bld):
-    bld.BUILD_SUBDIR('../../buildtools/wafsamba')
+    bld.RECURSE('buildtools/wafsamba')
 
     REPLACE_SOURCE = 'replace.c snprintf.c'
 
 
     REPLACE_SOURCE = 'replace.c snprintf.c'
 
index e577643595eab9ef04cfc6f49c3f1d12b3549d13..9c6316289e651c5ff20abc2c2cdfea138e663bf2 100644 (file)
@@ -29,10 +29,10 @@ samba_dist.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc')
-    opt.recurse(LIBREPLACE_DIR)
+    opt.RECURSE(LIBREPLACE_DIR)
 
 def configure(conf):
 
 def configure(conf):
-    conf.sub_config(LIBREPLACE_DIR)
+    conf.RECURSE(LIBREPLACE_DIR)
 
     if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
                                  implied_deps='replace'):
 
     if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
                                  implied_deps='replace'):
@@ -45,7 +45,7 @@ def configure(conf):
 
 
 def build(bld):
 
 
 def build(bld):
-    bld.BUILD_SUBDIR(LIBREPLACE_DIR)
+    bld.RECURSE(LIBREPLACE_DIR)
 
     if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
         bld.SAMBA_LIBRARY('talloc',
 
     if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
         bld.SAMBA_LIBRARY('talloc',
index 8c941948c88393231ea41ee5cbf70760ee417dbf..a11832f98550719d9ecf51291eb33c7cf8824c42 100644 (file)
@@ -24,10 +24,10 @@ LIBREPLACE_DIR= '../replace'
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion='tdb')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion='tdb')
-    opt.recurse(LIBREPLACE_DIR)
+    opt.RECURSE(LIBREPLACE_DIR)
 
 def configure(conf):
 
 def configure(conf):
-    conf.sub_config(LIBREPLACE_DIR)
+    conf.RECURSE(LIBREPLACE_DIR)
 
     if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
                                  implied_deps='replace'):
 
     if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
                                  implied_deps='replace'):
@@ -36,7 +36,7 @@ def configure(conf):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
-    bld.BUILD_SUBDIR(LIBREPLACE_DIR)
+    bld.RECURSE(LIBREPLACE_DIR)
 
     COMMON_SRC = bld.SUBDIR('common',
                             '''check.c error.c tdb.c traverse.c
 
     COMMON_SRC = bld.SUBDIR('common',
                             '''check.c error.c tdb.c traverse.c
index cc139ccee578b815dbd776377e7d63c808ae4cb4..569740e8d035b9392eb37369135cc11cc5062df9 100644 (file)
@@ -25,12 +25,12 @@ LIBTALLOC_DIR=  '../talloc'
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextenion='tevent')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('tevent', noextenion='tevent')
-    opt.recurse(LIBREPLACE_DIR)
-    opt.recurse(LIBTALLOC_DIR)
+    opt.RECURSE(LIBREPLACE_DIR)
+    opt.RECURSE(LIBTALLOC_DIR)
 
 def configure(conf):
 
 def configure(conf):
-    conf.sub_config(LIBREPLACE_DIR)
-    conf.sub_config(LIBTALLOC_DIR)
+    conf.RECURSE(LIBREPLACE_DIR)
+    conf.RECURSE(LIBTALLOC_DIR)
 
     if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
                                  onlyif='talloc', implied_deps='replace talloc'):
 
     if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION,
                                  onlyif='talloc', implied_deps='replace talloc'):
@@ -42,8 +42,8 @@ def configure(conf):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
-    bld.BUILD_SUBDIR(LIBREPLACE_DIR)
-    bld.BUILD_SUBDIR(LIBTALLOC_DIR)
+    bld.RECURSE(LIBREPLACE_DIR)
+    bld.RECURSE(LIBTALLOC_DIR)
 
     SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
              tevent_queue.c tevent_req.c tevent_select.c
 
     SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
              tevent_queue.c tevent_req.c tevent_select.c
index 1fee2083974fa0753f6300fac7e7df8f20f6ad7d..8846a6a8e4ca5cef570d8beadb32026cbb14275b 100644 (file)
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('idl')
+bld.RECURSE('idl')
 
 
index e4b044418ab5d88371f2f7839e9b429b00415ed8..f8d12c1c07920527fbc532660874546739603413 100644 (file)
@@ -20,7 +20,7 @@ def configure(conf):
 def build(bld):
     bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=0755)
 
 def build(bld):
     bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=0755)
 
-    bld.BUILD_SUBDIR('lib')
+    bld.RECURSE('lib')
 
     if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
         return
 
     if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'):
         return
index ac231d4ed33371a8786d7c607561303bc92f7270..6b669dbd42b6ae10c2affeaff01375785f538061 100644 (file)
@@ -12,11 +12,11 @@ from samba_utils import *
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('s3')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('s3')
-    opt.recurse('../lib/replace')
-    opt.recurse('build')
-    opt.recurse('../lib/nss_wrapper')
-    opt.recurse('../lib/socket_wrapper')
-    opt.recurse('../lib/uid_wrapper')
+    opt.RECURSE('../lib/replace')
+    opt.RECURSE('build')
+    opt.RECURSE('../lib/nss_wrapper')
+    opt.RECURSE('../lib/socket_wrapper')
+    opt.RECURSE('../lib/uid_wrapper')
 
     opt.add_option('--with-static-modules',
                    help=("Comma-separated list of names of modules to statically link in"),
 
     opt.add_option('--with-static-modules',
                    help=("Comma-separated list of names of modules to statically link in"),
@@ -45,14 +45,14 @@ def configure(conf):
 
     conf.ADD_EXTRA_INCLUDES('#source3 #source3/include #lib/replace #lib/talloc #lib/tevent #source3/libaddns #source3/librpc')
 
 
     conf.ADD_EXTRA_INCLUDES('#source3 #source3/include #lib/replace #lib/talloc #lib/tevent #source3/libaddns #source3/librpc')
 
-    conf.sub_config('../lib/replace')
-    conf.sub_config('build')
-    conf.sub_config('../lib/tdb')
-    conf.sub_config('../lib/talloc')
-    conf.sub_config('../lib/tevent')
-    conf.sub_config('../lib/nss_wrapper')
-    conf.sub_config('../lib/socket_wrapper')
-    conf.sub_config('../lib/uid_wrapper')
+    conf.RECURSE('../lib/replace')
+    conf.RECURSE('build')
+    conf.RECURSE('../lib/tdb')
+    conf.RECURSE('../lib/talloc')
+    conf.RECURSE('../lib/tevent')
+    conf.RECURSE('../lib/nss_wrapper')
+    conf.RECURSE('../lib/socket_wrapper')
+    conf.RECURSE('../lib/uid_wrapper')
 
     conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h')
 
 
     conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h')
 
index 34d7667325178564c86513ae577541bd21150eb4..7b64263549baa4062c91f4092ebf5123a8d28298 100644 (file)
@@ -587,9 +587,9 @@ bld.SAMBA_GENERATOR('build_options',
 
 bld.SETUP_BUILD_GROUPS()
 
 
 bld.SETUP_BUILD_GROUPS()
 
-bld.BUILD_SUBDIR('../lib/replace')
+bld.RECURSE('../lib/replace')
 print "SBINDIR=%s" % bld.env.SBINDIR
 print "SBINDIR=%s" % bld.env.SBINDIR
-bld.BUILD_SUBDIR('build')
+bld.RECURSE('build')
 
 bld.SAMBA_MKVERSION('include/version.h')
 
 
 bld.SAMBA_MKVERSION('include/version.h')
 
@@ -598,11 +598,11 @@ bld.SAMBA_BINARY('smbd/smbd',
                  deps='tdb DYNCONFIG',
                  vars=locals())
 
                  deps='tdb DYNCONFIG',
                  vars=locals())
 
-bld.BUILD_SUBDIR('../lib/socket_wrapper')
-bld.BUILD_SUBDIR('../lib/talloc')
-bld.BUILD_SUBDIR('../lib/tdb')
-bld.BUILD_SUBDIR('../lib/nss_wrapper')
-bld.BUILD_SUBDIR('../lib/uid_wrapper')
+bld.RECURSE('../lib/socket_wrapper')
+bld.RECURSE('../lib/talloc')
+bld.RECURSE('../lib/tdb')
+bld.RECURSE('../lib/nss_wrapper')
+bld.RECURSE('../lib/uid_wrapper')
 
 bld.ENFORCE_GROUP_ORDERING()
 bld.CHECK_PROJECT_RULES()
 
 bld.ENFORCE_GROUP_ORDERING()
 bld.CHECK_PROJECT_RULES()
index 6cb3ad510f099adca9b51bec3e28051e46aa37a0..349171e0814412f52ad26ff131936408009d985e 100644 (file)
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('gensec')
-bld.BUILD_SUBDIR('kerberos')
-bld.BUILD_SUBDIR('ntlmssp')
-bld.BUILD_SUBDIR('ntlm')
-bld.BUILD_SUBDIR('credentials')
+bld.RECURSE('gensec')
+bld.RECURSE('kerberos')
+bld.RECURSE('ntlmssp')
+bld.RECURSE('ntlm')
+bld.RECURSE('credentials')
 
 bld.SAMBA_SUBSYSTEM('auth_session',
        source='session.c',
 
 bld.SAMBA_SUBSYSTEM('auth_session',
        source='session.c',
index 69d24e6261c10e2da003e0b05e618d3a5a803ddf..966f65c65f39f0513dddc233b93710d01ae9ed93 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('samdb/ldb_modules')
+bld.RECURSE('samdb/ldb_modules')
 
 bld.SAMBA_SUBSYSTEM('SAMDB',
        source='samdb/samdb.c samdb/samdb_privilege.c samdb/cracknames.c repl/replicated_objects.c',
 
 bld.SAMBA_SUBSYSTEM('SAMDB',
        source='samdb/samdb.c samdb/samdb_privilege.c samdb/cracknames.c repl/replicated_objects.c',
index 968485f69f0c5d44ff4f67616b785e9d3c00a943..9d3eddfc99f26ae6fadc1ce5483f30f0f1672b92 100644 (file)
@@ -26,13 +26,13 @@ LIBPOPT_DIR= '../../../lib/popt'
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextenion='ldb')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('replace')
     opt.BUNDLED_EXTENSION_DEFAULT('ldb', noextenion='ldb')
-    opt.recurse(LIBTDB_DIR)
-    opt.recurse(LIBTEVENT_DIR)
+    opt.RECURSE(LIBTDB_DIR)
+    opt.RECURSE(LIBTEVENT_DIR)
 
 def configure(conf):
 
 def configure(conf):
-    conf.sub_config(LIBTDB_DIR)
-    conf.sub_config(LIBTEVENT_DIR)
-    conf.sub_config(LIBPOPT_DIR)
+    conf.RECURSE(LIBTDB_DIR)
+    conf.RECURSE(LIBTEVENT_DIR)
+    conf.RECURSE(LIBPOPT_DIR)
     # where does the default LIBDIR end up? in conf.env somewhere?
     #
     conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
     # where does the default LIBDIR end up? in conf.env somewhere?
     #
     conf.CONFIG_PATH('LDB_MODULESDIR', conf.SUBST_ENV_VAR('MODULESDIR') + '/ldb')
@@ -53,9 +53,9 @@ def configure(conf):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
     conf.SAMBA_CONFIG_H()
 
 def build(bld):
-    bld.BUILD_SUBDIR(LIBTDB_DIR)
-    bld.BUILD_SUBDIR(LIBTEVENT_DIR)
-    bld.BUILD_SUBDIR(LIBPOPT_DIR)
+    bld.RECURSE(LIBTDB_DIR)
+    bld.RECURSE(LIBTEVENT_DIR)
+    bld.RECURSE(LIBPOPT_DIR)
 
     # in Samba4 we build some extra modules, and add extra
     # capabilities to the ldb cmdline tools
 
     # in Samba4 we build some extra modules, and add extra
     # capabilities to the ldb cmdline tools
index d06ab4d75527b5771004e0168f8e655ef453efbb..d46fed7f1b7ea514de98976650da6661609ec517 100644 (file)
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('ldap')
-bld.BUILD_SUBDIR('security')
-bld.BUILD_SUBDIR('wbclient')
+bld.RECURSE('ldap')
+bld.RECURSE('security')
+bld.RECURSE('wbclient')
 
 bld.SAMBA_SUBSYSTEM('LIBSAMBA-ERRORS',
        source='../../libcli/util/doserr.c util/errormap.c util/nterr.c',
 
 bld.SAMBA_SUBSYSTEM('LIBSAMBA-ERRORS',
        source='../../libcli/util/doserr.c util/errormap.c util/nterr.c',
@@ -96,4 +96,4 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_RAW',
        deps='LIBCLI_COMPOSITE LP_RESOLVE gensec LIBCLI_RESOLVE LIBSECURITY LIBNDR'
        )
 
        deps='LIBCLI_COMPOSITE LP_RESOLVE gensec LIBCLI_RESOLVE LIBSECURITY LIBNDR'
        )
 
-bld.BUILD_SUBDIR('smb2')
+bld.RECURSE('smb2')
index 29fc95dcc0ea5cb3d08142e979c252c50d3b0d72..ccc1eec139a2e5687c59236ea75d22bfd0746a79 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('../../librpc/idl')
-bld.BUILD_SUBDIR('idl')
+bld.RECURSE('../../librpc/idl')
+bld.RECURSE('idl')
 
 bld.SAMBA_LIBRARY('LIBNDR',
        source='ndr/ndr_string.c ../../librpc/ndr/ndr_basic.c ../../librpc/ndr/uuid.c ../../librpc/ndr/ndr.c ../../librpc/ndr/ndr_misc.c ../../librpc/gen_ndr/ndr_misc.c',
 
 bld.SAMBA_LIBRARY('LIBNDR',
        source='ndr/ndr_string.c ../../librpc/ndr/ndr_basic.c ../../librpc/ndr/uuid.c ../../librpc/ndr/ndr.c ../../librpc/ndr/ndr_misc.c ../../librpc/gen_ndr/ndr_misc.c',
index 9124f662a43db6eb9ed60f7ff7d7da7655bb77eb..8aead7f224e6755c6fec8b4d135271dc4eeca708 100644 (file)
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
 
 #!/usr/bin/env python
 
-bld.BUILD_SUBDIR('posix')
-bld.BUILD_SUBDIR('common')
-bld.BUILD_SUBDIR('unixuid')
-bld.BUILD_SUBDIR('sysdep')
+bld.RECURSE('posix')
+bld.RECURSE('common')
+bld.RECURSE('unixuid')
+bld.RECURSE('sysdep')
 
 bld.SAMBA_MODULE('ntvfs_cifs',
        source='cifs/vfs_cifs.c',
 
 bld.SAMBA_MODULE('ntvfs_cifs',
        source='cifs/vfs_cifs.c',
index 38f50ff0db32673b705d77c0aff515d7516b4f5d..8ea4b48b81d2642ddb51049664202696ebfbc42a 100644 (file)
@@ -23,5 +23,5 @@ bld.SAMBA_SUBSYSTEM('SMB_SERVER',
        public_deps='share LIBPACKET SMB_PROTOCOL SMB2_PROTOCOL'
        )
 
        public_deps='share LIBPACKET SMB_PROTOCOL SMB2_PROTOCOL'
        )
 
-bld.BUILD_SUBDIR('smb')
-bld.BUILD_SUBDIR('smb2')
+bld.RECURSE('smb')
+bld.RECURSE('smb2')
index f36f2e22ce718fca76035b854095e0378578471f..79deefb3ed2308cfc68e4d59ec31551bac56cd8f 100644 (file)
@@ -27,10 +27,10 @@ bld.SAMBA_MODULE('TORTURE_RAW',
        internal_module=True
        )
 
        internal_module=True
        )
 
-bld.BUILD_SUBDIR('smb2')
-bld.BUILD_SUBDIR('winbind')
-bld.BUILD_SUBDIR('libnetapi')
-bld.BUILD_SUBDIR('libsmbclient')
+bld.RECURSE('smb2')
+bld.RECURSE('winbind')
+bld.RECURSE('libnetapi')
+bld.RECURSE('libsmbclient')
 
 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
        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 ndr/drsblobs.c',
 
 bld.SAMBA_SUBSYSTEM('TORTURE_NDR',
        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 ndr/drsblobs.c',
@@ -48,7 +48,7 @@ bld.SAMBA_MODULE('torture_rpc',
        internal_module=True
        )
 
        internal_module=True
        )
 
-bld.BUILD_SUBDIR('drs')
+bld.RECURSE('drs')
 
 bld.SAMBA_MODULE('TORTURE_RAP',
        source='rap/rap.c rap/rpc.c',
 
 bld.SAMBA_MODULE('TORTURE_RAP',
        source='rap/rap.c rap/rpc.c',
@@ -68,7 +68,7 @@ bld.SAMBA_MODULE('TORTURE_AUTH',
        internal_module=True
        )
 
        internal_module=True
        )
 
-bld.BUILD_SUBDIR('local')
+bld.RECURSE('local')
 
 bld.SAMBA_MODULE('TORTURE_NBENCH',
        source='nbench/nbio.c nbench/nbench.c',
 
 bld.SAMBA_MODULE('TORTURE_NBENCH',
        source='nbench/nbio.c nbench/nbench.c',
index 36796d633381a217d15a4ae01e5104127af0a4e7..fea583104788dbe3f9682e02728e8bc12221fe02 100644 (file)
@@ -19,16 +19,16 @@ Options.default_prefix = '/usr/local/samba'
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('samba4')
 def set_options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.BUNDLED_EXTENSION_DEFAULT('samba4')
-    opt.recurse('../lib/replace')
-    opt.recurse('dynconfig')
-    opt.recurse('scripting/python')
-    opt.recurse('lib/ldb')
-    opt.recurse('selftest')
-    opt.recurse('lib/tls')
-    opt.recurse('../lib/nss_wrapper')
-    opt.recurse('../lib/socket_wrapper')
-    opt.recurse('../lib/uid_wrapper')
-    opt.recurse('../pidl')
+    opt.RECURSE('../lib/replace')
+    opt.RECURSE('dynconfig')
+    opt.RECURSE('scripting/python')
+    opt.RECURSE('lib/ldb')
+    opt.RECURSE('selftest')
+    opt.RECURSE('lib/tls')
+    opt.RECURSE('../lib/nss_wrapper')
+    opt.RECURSE('../lib/socket_wrapper')
+    opt.RECURSE('../lib/uid_wrapper')
+    opt.RECURSE('../pidl')
 
 def configure(conf):
     conf.DEFINE('PACKAGE_NAME', 'samba', quote=True)
 
 def configure(conf):
     conf.DEFINE('PACKAGE_NAME', 'samba', quote=True)
@@ -50,7 +50,7 @@ def configure(conf):
 
     conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include')
 
 
     conf.ADD_EXTRA_INCLUDES('#source4 #lib #source4/lib #source4/include')
 
-    conf.sub_config('../lib/replace')
+    conf.RECURSE('../lib/replace')
 
     conf.find_program('python', var='PYTHON', mandatory=True)
     conf.find_program('perl', var='PERL', mandatory=True)
 
     conf.find_program('python', var='PYTHON', mandatory=True)
     conf.find_program('perl', var='PERL', mandatory=True)
@@ -60,23 +60,23 @@ def configure(conf):
     conf.check_python_version((2,4,2))
     conf.check_python_headers()
 
     conf.check_python_version((2,4,2))
     conf.check_python_headers()
 
-    conf.sub_config('dynconfig')
-    conf.sub_config('scripting/python')
-    conf.sub_config('lib/ldb')
-    conf.sub_config('heimdal_build')
-    conf.sub_config('lib/tls')
-    conf.sub_config('ntvfs/sysdep')
-    conf.sub_config('../lib/util')
-    conf.sub_config('../lib/zlib')
-    conf.sub_config('../lib/util/charset')
-    conf.sub_config('auth')
-    conf.sub_config('../lib/nss_wrapper')
-    conf.sub_config('../nsswitch')
-    conf.sub_config('../lib/socket_wrapper')
-    conf.sub_config('../lib/uid_wrapper')
-    conf.sub_config('../lib/popt')
-    conf.sub_config('lib/smbreadline')
-    conf.sub_config('../pidl')
+    conf.RECURSE('dynconfig')
+    conf.RECURSE('scripting/python')
+    conf.RECURSE('lib/ldb')
+    conf.RECURSE('heimdal_build')
+    conf.RECURSE('lib/tls')
+    conf.RECURSE('ntvfs/sysdep')
+    conf.RECURSE('../lib/util')
+    conf.RECURSE('../lib/zlib')
+    conf.RECURSE('../lib/util/charset')
+    conf.RECURSE('auth')
+    conf.RECURSE('../lib/nss_wrapper')
+    conf.RECURSE('../nsswitch')
+    conf.RECURSE('../lib/socket_wrapper')
+    conf.RECURSE('../lib/uid_wrapper')
+    conf.RECURSE('../lib/popt')
+    conf.RECURSE('lib/smbreadline')
+    conf.RECURSE('../pidl')
 
     # we don't want PYTHONDIR in config.h, as otherwise changing
     # --prefix causes a complete rebuild
 
     # we don't want PYTHONDIR in config.h, as otherwise changing
     # --prefix causes a complete rebuild
index f3b20eab36e636e7e5cbeb914cce78308b9987ef..d128a85299830d54e9ab99aa06c2eafa6f0cb0e1 100644 (file)
@@ -40,80 +40,80 @@ bld.SAMBA_SUBSYSTEM('pyldb_util', '')
 bld.SAMBA_SUBSYSTEM('TORTURE_LDB_MODULE', '')
 
 
 bld.SAMBA_SUBSYSTEM('TORTURE_LDB_MODULE', '')
 
 
-bld.BUILD_SUBDIR('../lib/replace')
-bld.BUILD_SUBDIR('../lib/talloc')
-bld.BUILD_SUBDIR('../lib/tdb')
-bld.BUILD_SUBDIR('../lib/tevent')
-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')
-bld.BUILD_SUBDIR('smbd')
-bld.BUILD_SUBDIR('cluster')
-bld.BUILD_SUBDIR('smbd')
-bld.BUILD_SUBDIR('libnet')
-bld.BUILD_SUBDIR('auth')
-bld.BUILD_SUBDIR('../nsswitch')
-bld.BUILD_SUBDIR('../nsswitch/libwbclient')
-bld.BUILD_SUBDIR('lib/samba3')
-bld.BUILD_SUBDIR('lib/socket')
-bld.BUILD_SUBDIR('lib/ldb-samba')
-bld.BUILD_SUBDIR('lib/tls')
-bld.BUILD_SUBDIR('lib/registry')
-bld.BUILD_SUBDIR('lib/messaging')
-bld.BUILD_SUBDIR('lib/events')
-bld.BUILD_SUBDIR('lib/cmdline')
-bld.BUILD_SUBDIR('../lib/socket_wrapper')
-bld.BUILD_SUBDIR('../lib/nss_wrapper')
-bld.BUILD_SUBDIR('../lib/uid_wrapper')
-bld.BUILD_SUBDIR('../lib/popt')
-bld.BUILD_SUBDIR('lib/stream')
-bld.BUILD_SUBDIR('../lib/util')
-bld.BUILD_SUBDIR('../lib/tdr')
-bld.BUILD_SUBDIR('../lib/tsocket')
-bld.BUILD_SUBDIR('../lib/crypto')
-bld.BUILD_SUBDIR('../lib/torture')
-bld.BUILD_SUBDIR('../lib/zlib')
-bld.BUILD_SUBDIR('lib')
-bld.BUILD_SUBDIR('lib/com')
-bld.BUILD_SUBDIR('smb_server')
-bld.BUILD_SUBDIR('rpc_server')
-bld.BUILD_SUBDIR('ldap_server')
-bld.BUILD_SUBDIR('web_server')
-bld.BUILD_SUBDIR('winbind')
-bld.BUILD_SUBDIR('nbt_server')
-bld.BUILD_SUBDIR('wrepl_server')
-bld.BUILD_SUBDIR('cldap_server')
-bld.BUILD_SUBDIR('ntp_signd')
-bld.BUILD_SUBDIR('utils/net')
-bld.BUILD_SUBDIR('utils')
-bld.BUILD_SUBDIR('ntvfs')
-bld.BUILD_SUBDIR('ntptr')
-bld.BUILD_SUBDIR('torture')
-bld.BUILD_SUBDIR('../librpc')
-bld.BUILD_SUBDIR('client')
-bld.BUILD_SUBDIR('libcli')
-bld.BUILD_SUBDIR('../libcli/smb')
-bld.BUILD_SUBDIR('../libcli/cldap')
-bld.BUILD_SUBDIR('kdc')
-bld.BUILD_SUBDIR('../lib/smbconf')
-bld.BUILD_SUBDIR('../lib/async_req')
-bld.BUILD_SUBDIR('../libcli/security')
-bld.BUILD_SUBDIR('../libcli/ldap')
-bld.BUILD_SUBDIR('../libcli/nbt')
-bld.BUILD_SUBDIR('../libcli/auth')
-bld.BUILD_SUBDIR('../libcli/drsuapi')
-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.BUILD_SUBDIR('../codepages')
-bld.BUILD_SUBDIR('setup')
-bld.BUILD_SUBDIR('scripting')
-bld.BUILD_SUBDIR('../pidl')
-bld.BUILD_SUBDIR('../lib')
+bld.RECURSE('../lib/replace')
+bld.RECURSE('../lib/talloc')
+bld.RECURSE('../lib/tdb')
+bld.RECURSE('../lib/tevent')
+bld.RECURSE('lib/ldb')
+bld.RECURSE('dynconfig')
+bld.RECURSE('../lib/util/charset')
+bld.RECURSE('scripting/python')
+bld.RECURSE('../lib/subunit/python')
+bld.RECURSE('param')
+bld.RECURSE('librpc')
+bld.RECURSE('dsdb')
+bld.RECURSE('smbd')
+bld.RECURSE('cluster')
+bld.RECURSE('smbd')
+bld.RECURSE('libnet')
+bld.RECURSE('auth')
+bld.RECURSE('../nsswitch')
+bld.RECURSE('../nsswitch/libwbclient')
+bld.RECURSE('lib/samba3')
+bld.RECURSE('lib/socket')
+bld.RECURSE('lib/ldb-samba')
+bld.RECURSE('lib/tls')
+bld.RECURSE('lib/registry')
+bld.RECURSE('lib/messaging')
+bld.RECURSE('lib/events')
+bld.RECURSE('lib/cmdline')
+bld.RECURSE('../lib/socket_wrapper')
+bld.RECURSE('../lib/nss_wrapper')
+bld.RECURSE('../lib/uid_wrapper')
+bld.RECURSE('../lib/popt')
+bld.RECURSE('lib/stream')
+bld.RECURSE('../lib/util')
+bld.RECURSE('../lib/tdr')
+bld.RECURSE('../lib/tsocket')
+bld.RECURSE('../lib/crypto')
+bld.RECURSE('../lib/torture')
+bld.RECURSE('../lib/zlib')
+bld.RECURSE('lib')
+bld.RECURSE('lib/com')
+bld.RECURSE('smb_server')
+bld.RECURSE('rpc_server')
+bld.RECURSE('ldap_server')
+bld.RECURSE('web_server')
+bld.RECURSE('winbind')
+bld.RECURSE('nbt_server')
+bld.RECURSE('wrepl_server')
+bld.RECURSE('cldap_server')
+bld.RECURSE('ntp_signd')
+bld.RECURSE('utils/net')
+bld.RECURSE('utils')
+bld.RECURSE('ntvfs')
+bld.RECURSE('ntptr')
+bld.RECURSE('torture')
+bld.RECURSE('../librpc')
+bld.RECURSE('client')
+bld.RECURSE('libcli')
+bld.RECURSE('../libcli/smb')
+bld.RECURSE('../libcli/cldap')
+bld.RECURSE('kdc')
+bld.RECURSE('../lib/smbconf')
+bld.RECURSE('../lib/async_req')
+bld.RECURSE('../libcli/security')
+bld.RECURSE('../libcli/ldap')
+bld.RECURSE('../libcli/nbt')
+bld.RECURSE('../libcli/auth')
+bld.RECURSE('../libcli/drsuapi')
+bld.RECURSE('../libcli/samsync')
+bld.RECURSE('../libgpo')
+bld.RECURSE('../libcli/named_pipe_auth')
+bld.RECURSE('heimdal_build')
+bld.RECURSE('lib/smbreadline')
+bld.RECURSE('../codepages')
+bld.RECURSE('setup')
+bld.RECURSE('scripting')
+bld.RECURSE('../pidl')
+bld.RECURSE('../lib')