ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build
Stefan (metze) Metzmacher
metze at samba.org
Mon Jun 8 03:23:39 MDT 2015
... and the patch:-)
Am 08.06.2015 um 10:52 schrieb Stefan (metze) Metzmacher:
> Hi,
>
> this patch makes sure that CTDB_VERSION_STRING and SAMBA_VERSION_STRING
> are always the same. For the top-level build is the SAMBA_VERSION_STRING
> source and for the standalone build it's CTDB_VERSION_STRING.
>
> This prevents rebuilding ctdb after each commit in the developer build.
>
> Please review and push.
>
> Thanks!
> metze
>
-------------- next part --------------
From e74354e7151464a82a0f08c2112af4974c4cb631 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Thu, 28 May 2015 16:17:15 +0200
Subject: [PATCH] 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 contains "4.3.0pre1-DEVELOPERBUILD",
instead of "4.3.0pre1.GIT.4ccdd39" for the non install build.
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
ctdb/wscript | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/ctdb/wscript b/ctdb/wscript
index cd02262..ea64f0b 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -225,25 +225,32 @@ 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:
+ 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='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():
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150608/9db4468a/attachment.pgp>
More information about the samba-technical
mailing list