Skip to content

Commit

Permalink
ctdb/wscript: pass dep_vars=['VERSION'] to SAMBA_GENERATOR()
Browse files Browse the repository at this point in the history
This avoid the use of always=True.

Signed-off-by: Stefan Metzmacher <[email protected]>
Reviewed-by: Michael Adam <[email protected]>
  • Loading branch information
metze-samba committed Sep 5, 2014
1 parent a41a9ad commit bab349c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions ctdb/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bab349c

Please sign in to comment.