summaryrefslogtreecommitdiff
path: root/ctdb/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-05-28 16:17:15 +0200
committerMichael Adam <obnox@samba.org>2015-06-08 15:51:46 +0200
commita84e982bebbd1c21eba70f2d4873a4a1f3b0f58e (patch)
tree2c5708ba6e2ee0433ec1ee30d2ef4ca7a5c81249 /ctdb/wscript
parent3863c0aa7100ac2e663b128ad115f44764f11d71 (diff)
downloadsamba-a84e982bebbd1c21eba70f2d4873a4a1f3b0f58e.tar.gz
ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build.
This avoids rebuilding ctdb after each commit, instead we're using SAMBA_VERSION_STRING, which may contain "4.3.0pre1-DEVELOPERBUILD", instead of "4.3.0pre1.GIT.4ccdd39" for the non-install build. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Mon Jun 8 15:51:46 CEST 2015 on sn-devel-104
Diffstat (limited to 'ctdb/wscript')
-rwxr-xr-xctdb/wscript26
1 files changed, 15 insertions, 11 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index 2c9c8b153d0..b5c6087661e 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -225,25 +225,29 @@ def build(bld):
# enable building of public headers in the build tree
bld.env.build_public_headers = 'include/public'
+ version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
+ "version.h"),
+ bld.curdir)
+
if bld.env.standalone_ctdb:
ctdb_mkversion = '../packaging/mkversion.sh'
- else:
- ctdb_mkversion = '../ctdb/packaging/mkversion.sh'
- t = bld.SAMBA_GENERATOR('ctdb-version-header',
- target='include/ctdb_version.h',
- rule='%s ${TGT} %s' % (ctdb_mkversion, VERSION),
- dep_vars=['VERSION'])
- t.env.VERSION = VERSION
+ t = bld.SAMBA_GENERATOR('ctdb-version-header',
+ target='include/ctdb_version.h',
+ rule='%s ${TGT} %s' % (ctdb_mkversion, VERSION),
+ dep_vars=['VERSION'])
+ t.env.VERSION = VERSION
- if bld.env.standalone_ctdb:
- version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
- "version.h"),
- bld.curdir)
t = bld.SAMBA_GENERATOR('ctdb-samba-version-header',
target=version_h,
rule='printf "#include \\"ctdb_version.h\\" \\n#define SAMBA_VERSION_STRING CTDB_VERSION_STRING\\n" > ${TGT}',
dep_vars=['VERSION'])
t.env.VERSION = VERSION
+ else:
+ t = bld.SAMBA_GENERATOR('ctdb-samba-version-header',
+ target='include/ctdb_version.h',
+ rule='printf "#include \\"%s\\" \\n#define CTDB_VERSION_STRING SAMBA_VERSION_STRING\\n" > ${TGT}' % version_h,
+ dep_vars=['VERSION'])
+ t.env.VERSION = VERSION
bld.RECURSE('lib/replace')
if bld.CHECK_FOR_THIRD_PARTY():