summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-23 11:16:44 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:35 +1000
commita3421fe6e9a823adce0b2c6fd3edcb2f476c9acf (patch)
treecc4e1a3ba16bc544f089ea042726fc36fa1f8e45 /lib
parent5393e6c9d24cd66aab57274665be1774beb4e732 (diff)
downloadsamba-a3421fe6e9a823adce0b2c6fd3edcb2f476c9acf.tar.gz
samba-a3421fe6e9a823adce0b2c6fd3edcb2f476c9acf.tar.bz2
samba-a3421fe6e9a823adce0b2c6fd3edcb2f476c9acf.zip
build: added BUILD_SUBDIR() wrapper
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wafsamba.py15
-rw-r--r--lib/talloc/wscript2
-rw-r--r--lib/tdb/wscript2
-rw-r--r--lib/tevent/wscript4
4 files changed, 19 insertions, 4 deletions
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