From a3421fe6e9a823adce0b2c6fd3edcb2f476c9acf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 23 Feb 2010 11:16:44 +1100 Subject: build: added BUILD_SUBDIR() wrapper --- lib/replace/wafsamba.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/replace') 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. -- cgit