build: added subdir option for module building
authorAndrew Tridgell <tridge@samba.org>
Tue, 15 Feb 2011 05:16:54 +0000 (16:16 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 18 Feb 2011 04:09:46 +0000 (15:09 +1100)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

buildtools/wafsamba/wafsamba.py

index 86eb730d5da819bcdac7bb8745760155842aeb13..bc722d59c4c53e9e35b3b9abb3dcb8b24be9dc3a 100644 (file)
@@ -371,6 +371,7 @@ def SAMBA_MODULE(bld, modname, source,
                  internal_module=True,
                  local_include=True,
                  vars=None,
+                 subdir=None,
                  enabled=True,
                  pyembed=False,
                  allow_undefined_symbols=False
@@ -378,6 +379,8 @@ def SAMBA_MODULE(bld, modname, source,
     '''define a Samba module.'''
 
     source = bld.EXPAND_VARIABLES(source, vars=vars)
+    if subdir:
+        source = bld.SUBDIR(subdir, source)
 
     if internal_module or BUILTIN_LIBRARY(bld, modname):
         bld.SAMBA_SUBSYSTEM(modname, source,