diff options
-rwxr-xr-x | buildtools/mktowscript/mktowscript.pl | 2 | ||||
-rw-r--r-- | lib/replace/wafsamba.py | 15 | ||||
-rw-r--r-- | lib/talloc/wscript | 2 | ||||
-rw-r--r-- | lib/tdb/wscript | 2 | ||||
-rw-r--r-- | lib/tevent/wscript | 4 | ||||
-rw-r--r-- | source4/lib/ldb/wscript | 4 | ||||
-rw-r--r-- | source4/wscript_build | 124 |
7 files changed, 84 insertions, 69 deletions
diff --git a/buildtools/mktowscript/mktowscript.pl b/buildtools/mktowscript/mktowscript.pl index 86ff65bd2e..b1a929a4b3 100755 --- a/buildtools/mktowscript/mktowscript.pl +++ b/buildtools/mktowscript/mktowscript.pl @@ -186,7 +186,7 @@ foreach my $s (sort {$result->{$a}->{SECNUMBER} <=> $result->{$b}->{SECNUMBER}} if ($sec->{TYPE} eq "SUBCONFIG") { my $d = dirname($s); next if ($d eq "."); - printf "bld.add_subdirs('%s')\n", dirname($s); + printf "bld.BUILD_SUBDIR('%s')\n", dirname($s); } else { printf "\nbld.SAMBA_%s('%s'", $sec->{TYPE}, $s; my $trailer=""; diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py index 34a3a93846..c7ceaf9631 100644 --- a/lib/replace/wafsamba.py +++ b/lib/replace/wafsamba.py @@ -282,6 +282,21 @@ def SAMBA_SUBSYSTEM(bld, modname, source_list, Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM +############################################################### +# add a new set of build rules from a subdirectory +def BUILD_SUBDIR(bld, dir): + try: + cache = bld.cache_build_subdirs + except AttributeError: + bld.cache_build_subdirs = cache = {} + abs_dir=os.path.normpath(bld.curdir + '/' + dir) + if abs_dir in cache: + return + cache[abs_dir] = True + bld.add_subdirs(dir) +Build.BuildContext.BUILD_SUBDIR = BUILD_SUBDIR + + ############################################################ # this overrides the 'waf -v' debug output to be in a nice # unix like format instead of a python list. diff --git a/lib/talloc/wscript b/lib/talloc/wscript index ca941c0555..38dde97517 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -13,7 +13,7 @@ def configure(conf): conf.SAMBA_CONFIG_H() def build(bld): - bld.add_subdirs(LIBREPLACE_DIR) + bld.BUILD_SUBDIR(LIBREPLACE_DIR) bld.SAMBA_LIBRARY('talloc', 'talloc.c', diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 0b159d4345..724030c84c 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -13,7 +13,7 @@ def configure(conf): conf.SAMBA_CONFIG_H() def build(bld): - bld.add_subdirs(LIBREPLACE_DIR) + bld.BUILD_SUBDIR(LIBREPLACE_DIR) COMMON_SRC = bld.SUBDIR('common', '''check.c error.c tdb.c traverse.c diff --git a/lib/tevent/wscript b/lib/tevent/wscript index a36d8bf68c..56607d1c63 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -20,8 +20,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() def build(bld): - bld.add_subdirs(LIBREPLACE_DIR) - bld.add_subdirs(LIBTALLOC_DIR) + bld.BUILD_SUBDIR(LIBREPLACE_DIR) + bld.BUILD_SUBDIR(LIBTALLOC_DIR) SRC = '''tevent.c tevent_debug.c tevent_epoll.c tevent_fd.c tevent_immediate.c tevent_queue.c tevent_req.c tevent_select.c diff --git a/source4/lib/ldb/wscript b/source4/lib/ldb/wscript index be31241c88..2a6bf5d102 100644 --- a/source4/lib/ldb/wscript +++ b/source4/lib/ldb/wscript @@ -17,8 +17,8 @@ def configure(conf): conf.SAMBA_CONFIG_H() def build(bld): - bld.add_subdirs(LIBTDB_DIR) - bld.add_subdirs(LIBTEVENT_DIR) + 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 diff --git a/source4/wscript_build b/source4/wscript_build index 45bc3ca97d..9fdc6b9ecf 100644 --- a/source4/wscript_build +++ b/source4/wscript_build @@ -1,64 +1,64 @@ # top level waf build script for samba4 -bld.add_subdirs('dynconfig') -bld.add_subdirs('dsdb') -bld.add_subdirs('smbd') -bld.add_subdirs('cluster') -bld.add_subdirs('smbd') -bld.add_subdirs('libnet') -bld.add_subdirs('auth') -bld.add_subdirs('../nsswitch') -bld.add_subdirs('../nsswitch/libwbclient') -bld.add_subdirs('lib/samba3') -bld.add_subdirs('lib/socket') -bld.add_subdirs('lib/ldb') -bld.add_subdirs('../lib/util/charset') -bld.add_subdirs('lib/ldb-samba') -bld.add_subdirs('lib/tls') -bld.add_subdirs('lib/registry') -bld.add_subdirs('lib/messaging') -bld.add_subdirs('lib/events') -bld.add_subdirs('lib/cmdline') -bld.add_subdirs('../lib/socket_wrapper') -bld.add_subdirs('../lib/nss_wrapper') -bld.add_subdirs('../lib/uid_wrapper') -bld.add_subdirs('lib/stream') -bld.add_subdirs('../lib/util') -bld.add_subdirs('../lib/tdr') -bld.add_subdirs('../lib/tsocket') -bld.add_subdirs('../lib/crypto') -bld.add_subdirs('../lib/torture') -bld.add_subdirs('lib') -bld.add_subdirs('lib/com') -bld.add_subdirs('param') -bld.add_subdirs('smb_server') -bld.add_subdirs('rpc_server') -bld.add_subdirs('ldap_server') -bld.add_subdirs('web_server') -bld.add_subdirs('winbind') -bld.add_subdirs('nbt_server') -bld.add_subdirs('wrepl_server') -bld.add_subdirs('cldap_server') -bld.add_subdirs('ntp_signd') -bld.add_subdirs('utils/net') -bld.add_subdirs('utils') -bld.add_subdirs('ntvfs') -bld.add_subdirs('ntptr') -bld.add_subdirs('torture') -bld.add_subdirs('librpc') -bld.add_subdirs('client') -bld.add_subdirs('libcli') -bld.add_subdirs('../libcli/smb') -bld.add_subdirs('../libcli/cldap') -bld.add_subdirs('scripting/python') -bld.add_subdirs('kdc') -bld.add_subdirs('../lib/smbconf') -bld.add_subdirs('../lib/async_req') -bld.add_subdirs('../libcli/security') -bld.add_subdirs('../libcli/ldap') -bld.add_subdirs('../libcli/nbt') -bld.add_subdirs('../libcli/auth') -bld.add_subdirs('../libcli/drsuapi') -bld.add_subdirs('../libcli/samsync') -bld.add_subdirs('../libgpo') -bld.add_subdirs('../libcli/named_pipe_auth') +bld.BUILD_SUBDIR('dynconfig') +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') +bld.BUILD_SUBDIR('../lib/util/charset') +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/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') +bld.BUILD_SUBDIR('lib/com') +bld.BUILD_SUBDIR('param') +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('scripting/python') +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') |