diff options
author | Alexander Bokovoy <ab@samba.org> | 2018-06-27 14:56:32 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-09-05 06:37:26 +0200 |
commit | 5c3d31eb14a621f1a8999f531532e77109e5ead5 (patch) | |
tree | 5b7ee08c8e5454bb0bf6d0cb0e6f530313c558b8 /ctdb/wscript | |
parent | 699977a2e7e49eb9cf15141075726134e5ddd34c (diff) | |
download | samba-5c3d31eb14a621f1a8999f531532e77109e5ead5.tar.gz |
cdtb/wscript: use top and out for waf 2.0
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'ctdb/wscript')
-rw-r--r-- | ctdb/wscript | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/ctdb/wscript b/ctdb/wscript index 865f0d9b69e..87483e0f713 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -2,17 +2,17 @@ APPNAME = 'ctdb' -blddir = 'bin' - import sys, os # find the buildtools directory -srcdir = '.' -while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5: - srcdir = srcdir + '/..' -sys.path.insert(0, srcdir + '/buildtools/wafsamba') +top = '.' +while not os.path.exists(top+'/buildtools') and len(top.split('/')) < 5: + top = top + '/..' +sys.path.insert(0, top + '/buildtools/wafsamba') + +out = 'bin' -from waflib import Options, Logs, Errors +from waflib import Options, Logs, Errors, Context import wafsamba, samba_dist import samba_utils, samba_version @@ -297,7 +297,7 @@ def configure(conf): if not conf.env.standalone_ctdb: conf.ADD_EXTRA_INCLUDES('#include/public #ctdb/include #ctdb') else: - if srcdir == '.': + if Context.g_module.top == '.': # Building from tarball conf.ADD_EXTRA_INCLUDES('#include') else: @@ -1206,8 +1206,7 @@ def rpm(ctx): def ctags(ctx): "build 'tags' file using ctags" - from waflib import Utils - source_root = os.path.dirname(Utils.g_module.root_path) + source_root = os.path.dirname(Context.g_module.root_path) cmd = 'ctags $(find %s -name "*.[ch]")' % source_root print("Running: %s" % cmd) ret = samba_utils.RUN_COMMAND(cmd) |