1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

build: added BUILD_SUBDIR() wrapper

This commit is contained in:
Andrew Tridgell 2010-02-23 11:16:44 +11:00
parent 5393e6c9d2
commit a3421fe6e9
7 changed files with 84 additions and 69 deletions

View File

@ -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="";

View File

@ -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.

View File

@ -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',

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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')