ctdb/wscript: pass dep_vars=['VERSION'] to SAMBA_GENERATOR()
authorStefan Metzmacher <metze@samba.org>
Wed, 27 Aug 2014 08:10:34 +0000 (10:10 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 5 Sep 2014 17:47:06 +0000 (19:47 +0200)
This avoid the use of always=True.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/wscript

index 9c7d697aa709a4cd41fae873583aac90e4556d77..9fc9671c6ed7d4b20b9c2077b903ea4d7953449b 100755 (executable)
@@ -171,10 +171,11 @@ def build(bld):
     bld.RECURSE('lib/tdb')
     bld.RECURSE('lib/socket_wrapper')
 
-    bld.SAMBA_GENERATOR('ctdb-version-header',
-                        target='include/ctdb_version.h',
-                        rule='../packaging/mkversion.sh ${TGT} %s' % (VERSION),
-                        always=True)
+    t = bld.SAMBA_GENERATOR('ctdb-version-header',
+                            target='include/ctdb_version.h',
+                            rule='../packaging/mkversion.sh ${TGT} %s' % (VERSION),
+                            dep_vars=['VERSION'])
+    t.env.VERSION = VERSION
 
     bld.SAMBA_SUBSYSTEM('ctdb-util',
                         source=bld.SUBDIR('lib/util',
@@ -414,10 +415,12 @@ def build(bld):
     bld.install_dir(bld.env.CTDB_VARDIR)
 
     sed_expr = 's/@PACKAGE_VERSION@/%s/g' % VERSION
-    bld.SAMBA_GENERATOR('ctdb-pc',
-                        source='ctdb.pc.in',
-                        target='ctdb.pc',
-                        rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr)
+    t = bld.SAMBA_GENERATOR('ctdb-pc',
+                            source='ctdb.pc.in',
+                            target='ctdb.pc',
+                            rule='sed -e "%s" ${SRC} > ${TGT}' % sed_expr,
+                            dep_vars=['VERSION'])
+    t.env.VERSION = VERSION
     bld.INSTALL_FILES('${LIBDIR}/pkgconfig', 'ctdb.pc')
 
     # Test binaries