Skip to content

Commit

Permalink
dynconfig/wscript: update to handle waf 2.0.4
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 efa94eb commit 18c3598
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dynconfig/wscript
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env python

import string, Logs, Utils, Options, Build, os, optparse, textwrap
import string
import os
import optparse
import textwrap
from waflib import Logs, Errors, Options, Build, Context
from samba_utils import EXPAND_VARIABLES, os_path_relpath

class SambaIndentedHelpFormatter (optparse.IndentedHelpFormatter):
Expand Down Expand Up @@ -261,9 +265,9 @@ dynconfig = {
},
}

def set_options(opt):
def options(opt):
opt.parser.formatter = SambaIndentedHelpFormatter()
opt.parser.formatter.width=Utils.get_term_cols()
opt.parser.formatter.width=Logs.get_term_cols()

for k in ('--with-privatelibdir', '--with-modulesdir'):
option = opt.parser.get_option(k)
Expand Down Expand Up @@ -305,7 +309,7 @@ def configure(conf):
flavor = 'STD-PATH'
if conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local':
Logs.error("Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)")
raise Utils.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))
raise Errors.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))

explicit_set ={}

Expand Down Expand Up @@ -416,7 +420,7 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('DYNCONFIG',
'dynconfig.c',
deps='replace',
public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir),
public_headers=os_path_relpath(os.path.join(Context.launch_dir, version_header), bld.path.abspath()),
header_path='samba',
cflags=cflags)

Expand Down

0 comments on commit 18c3598

Please sign in to comment.