From 41a47f7bc638550f09d73c2968d812b8d909f8d6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 16 Jun 2017 12:15:25 +0200 Subject: [PATCH] TODO ctdb: use a fixed ctdb_version.h using SAMBA_VERSION_DOT_STRING This way we don't get constant rebuild as SAMBA_VERSION_DOT_STRING is "4.7.0pre1.DEVELOPERBUILD" for the binaries under bin/ instead of "4.7.0pre1.GIT.59e51f6". Signed-off-by: Stefan Metzmacher --- ctdb/.gitignore | 1 - ctdb/include/ctdb_version.h | 3 +++ ctdb/wscript | 15 --------------- 3 files changed, 3 insertions(+), 16 deletions(-) create mode 100644 ctdb/include/ctdb_version.h diff --git a/ctdb/.gitignore b/ctdb/.gitignore index a634aeb8b452..f0534b3afd16 100644 --- a/ctdb/.gitignore +++ b/ctdb/.gitignore @@ -27,7 +27,6 @@ tests/takeover/ctdb_takeover.pyc tests/eventscripts/var tests/eventscripts/etc/iproute2 tests/eventscripts/etc-ctdb/policy_routing -include/ctdb_version.h packaging/RPM/ctdb.spec doc/*.[1-7] doc/*.[1-7].html diff --git a/ctdb/include/ctdb_version.h b/ctdb/include/ctdb_version.h new file mode 100644 index 000000000000..6558974f0032 --- /dev/null +++ b/ctdb/include/ctdb_version.h @@ -0,0 +1,3 @@ +#include "version.h" + +#define CTDB_VERSION_STRING SAMBA_VERSION_DOT_STRING diff --git a/ctdb/wscript b/ctdb/wscript index 30b09d6dc16a..4886ca7c3e7a 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -340,15 +340,6 @@ def configure(conf): else: Logs.info(" %s: no" % (m)) -def gen_ctdb_version(task): - fp = open(task.outputs[0].bldpath(task.env), 'w') - fp.write('/* This file is auto-generated from waf */\n') - fp.write('#include "version.h"\n') - fp.write('\n') - fp.write('#define CTDB_VERSION_STRING "%s"\n' % get_version_string()) - fp.close() - - def build(bld): if bld.env.standalone_ctdb: # enable building of public headers in the build tree @@ -357,12 +348,6 @@ def build(bld): if bld.env.standalone_ctdb: bld.SAMBA_MKVERSION('version.h', '%s/VERSION' % vdir) - t = bld.SAMBA_GENERATOR('ctdb-version-header', - target='include/ctdb_version.h', - rule=gen_ctdb_version, - dep_vars=['VERSION']) - t.env.VERSION = get_version_string() - bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' bld.RECURSE('lib/replace') -- 2.17.1