ctdb-build: Add special target to get build version
authorAmitay Isaacs <amitay@gmail.com>
Mon, 23 Jun 2014 02:55:19 +0000 (12:55 +1000)
committerMartin Schwenke <martins@samba.org>
Tue, 24 Jun 2014 05:23:13 +0000 (07:23 +0200)
This avoids the need to build a tarball to get version information.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/Makefile
ctdb/wscript

index 9ffce81eb32f5a3bb598c17d8110e236d9b13855..4d2f059916a543a2c7b2bbc5684ce8c0889930ca 100644 (file)
@@ -23,6 +23,10 @@ autotest:
 quicktest:
        $(WAF) test --quick $(TEST_OPTIONS)
 
+show_version:
+       @touch .tmplock
+       @WAFLOCK=.tmplock $(WAF) show_version
+
 dist:
        touch .tmplock
        WAFLOCK=.tmplock $(WAF) dist
index f69bf580f71ed03d699e6648d3015235ea99f3e8..afd40d3399e95628c753d0775c7de32df6943386 100755 (executable)
@@ -523,8 +523,10 @@ def autotest(ctx):
     cmd = 'LD_PRELOAD=bin/shared/libsocket-wrapper.so tests/run_tests.sh -e -S -C'
     samba_utils.RUN_COMMAND(cmd)
 
-def dist():
+def show_version(ctx):
+    print VERSION
 
+def dist():
     samba_dist.DIST_FILES('VERSION:VERSION', extend=True)
 
     t = 'include/ctdb_version.h'