build: allow always=True/False on SAMBA_GENERATOR()
authorAndrew Tridgell <tridge@samba.org>
Mon, 28 Jun 2010 02:07:55 +0000 (12:07 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 29 Jun 2010 04:28:08 +0000 (14:28 +1000)
this allows us to force a rule to always run. Will be used by
samba_version

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/wafsamba.py

index 5ffe4b8f9b6647f06d6513e1a529587010882309..21ed001372bbf40f510d73aa085e1908011608ba 100644 (file)
@@ -484,7 +484,8 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
                     group='generators', enabled=True,
                     public_headers=None,
                     header_path=None,
-                    vars=None):
+                    vars=None,
+                    always=False):
     '''A generic source generator target'''
 
     if not SET_TARGET_TYPE(bld, name, 'GENERATOR'):
@@ -504,6 +505,9 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='',
         ext_out='.c',
         name=name)
 
+    if always:
+        t.always = True
+
     if public_headers is not None:
         bld.PUBLIC_HEADERS(public_headers, header_path=header_path)
     return t