build: support variable expansion in source= arguments to build rules
[nivanova/samba-autobuild/.git] / buildtools / wafsamba / samba_python.py
index 7536250d0d6bf537cce916ee0cf879dd068e7c3d..9a887a80a55a8c06830ec588114928b7af83cdc3 100644 (file)
@@ -14,6 +14,7 @@ def SAMBA_PYTHON(bld, name,
                  includes='',
                  init_function_sentinal=None,
                  local_include=True,
+                 vars=None,
                  enabled=True):
     '''build a python extension for Samba'''
 
@@ -22,6 +23,8 @@ def SAMBA_PYTHON(bld, name,
     if init_function_sentinal is not None:
         cflags += '-DSTATIC_LIBPYTHON_MODULES=%s' % init_function_sentinal
 
+    source = bld.EXPAND_VARIABLES(source, vars=vars)
+
     if realname is None:
         # a SAMBA_PYTHON target without a realname is just a
         # subsystem with needs_python=True