lib/replace/wscript: update to handle waf 2.0.4
authorAlexander Bokovoy <ab@samba.org>
Fri, 2 Feb 2018 14:34:31 +0000 (16:34 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Sep 2018 04:37:23 +0000 (06:37 +0200)
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/replace/wscript

index 3dd10ae..fa9b837 100644 (file)
@@ -3,22 +3,24 @@
 APPNAME = 'libreplace'
 VERSION = '1.2.1'
 
-blddir = 'bin'
-
-import Logs, sys, os
+import sys
+import 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'
 
-import wafsamba, samba_dist
-import Options, Utils
+import wafsamba
+from wafsamba import samba_dist
+from waflib import Options, Utils, Logs, Context
 
 samba_dist.DIST_DIRS('lib/replace buildtools:buildtools third_party/waf:third_party/waf')
 
-def set_options(opt):
+def options(opt):
     opt.BUILTIN_DEFAULT('NONE')
     opt.PRIVATE_EXTENSION_DEFAULT('')
     opt.RECURSE('buildtools/wafsamba')