Skip to content

Commit

Permalink
ctdb/wscript: adopt to waf-2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bokovoy <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
abbra authored and abartlet committed Sep 5, 2018
1 parent 7aaa1e6 commit 175be93
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions ctdb/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
srcdir = srcdir + '/..'
sys.path.insert(0, srcdir + '/buildtools/wafsamba')

from waflib import Options, Logs, Utils
from waflib import Options, Logs, Errors
import wafsamba, samba_dist
import samba_utils, samba_version

Expand Down Expand Up @@ -103,7 +103,6 @@ def options(opt):


def configure(conf):

# No need to build python bindings for talloc/tevent/tdb
if conf.IN_LAUNCH_DIR():
conf.env.standalone_ctdb = True
Expand Down Expand Up @@ -140,15 +139,15 @@ def configure(conf):
conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
else:
if not conf.CHECK_POPT():
raise Utils.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
raise Errors.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
else:
conf.define('USING_SYSTEM_POPT', 1)
conf.env.SOCKET_WRAPPER_SO_PATH = ''


if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
if not conf.CHECK_SOCKET_WRAPPER():
raise Utils.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
raise Errors.WafError('socket_wrapper package has not been found.\nIf third_party is installed, check that it is in the proper place.')
else:
conf.define('USING_SYSTEM_SOCKET_WRAPPER', 1)
conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
Expand Down Expand Up @@ -1116,7 +1115,7 @@ def testonly(ctx):


def test(ctx):
import Scripting
from waflib import Scripting
Scripting.commands.append('build')
Scripting.commands.append('testonly')

Expand Down Expand Up @@ -1184,7 +1183,7 @@ def distonly(ctx):


def dist():
import Scripting
from waflib import Scripting
Scripting.commands.append('manpages')
Scripting.commands.append('distonly')

Expand All @@ -1199,15 +1198,15 @@ def rpmonly(ctx):


def rpm(ctx):
import Scripting
from waflib import Scripting
Scripting.commands.append('manpages')
Scripting.commands.append('distonly')
Scripting.commands.append('rpmonly')


def ctags(ctx):
"build 'tags' file using ctags"
import Utils
from waflib import Utils
source_root = os.path.dirname(Utils.g_module.root_path)
cmd = 'ctags $(find %s -name "*.[ch]")' % source_root
print("Running: %s" % cmd)
Expand Down

0 comments on commit 175be93

Please sign in to comment.