summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-23 11:55:28 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:36 +1000
commite3dca1412b687bb91c21501801ded63afd665ef4 (patch)
tree518f953bfefab1a134a39e7d2c7cf3771feda81d /lib
parent371f9d35a7153832773958e8815b95bb0ae5854a (diff)
downloadsamba-e3dca1412b687bb91c21501801ded63afd665ef4.tar.gz
samba-e3dca1412b687bb91c21501801ded63afd665ef4.tar.bz2
samba-e3dca1412b687bb91c21501801ded63afd665ef4.zip
build: simpler BUILD_SUBDIR
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wafsamba.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py
index 46a1ea86af..737a058086 100644
--- a/lib/replace/wafsamba.py
+++ b/lib/replace/wafsamba.py
@@ -314,15 +314,10 @@ Build.BuildContext.SAMBA_SUBSYSTEM = SAMBA_SUBSYSTEM
###############################################################
# add a new set of build rules from a subdirectory
+# the @runonce decorator ensures we don't end up
+# with duplicate rules
+@runonce
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