Logs.zones = ['runner']
if Logs.verbose > 2:
Logs.zones = ['*']
- elif opt[0].isupper() and opt.find('=') != -1:
+ elif (opt[0].isupper() or opt[0] == '_') and '=' in opt:
# this allows us to set waf options on the make command line
# for example, if you do "make FOO=blah", then we set the
# option 'FOO' in Options.options, to blah. If you look in wafsamba/wscript
_args=_args,
cwd=cwd,
allow_unknown=allow_unknown)
+ commands = []
+ for arg in leftover_args:
+ if '=' in arg and (arg.startswith('_') or arg[0].isupper()):
+ # We assume this is an environment setting argument, not a
+ # build target.
+ k, v = arg.split('=', 1)
+ setattr(options, k, v)
+ else:
+ commands.append(arg)
+
CHECK_MAKEFLAGS(options)
if options.jobs == 1:
#
return
from waflib import Runner
Runner.Spawner = NoOpSpawner
- return options, leftover_args
+ return options, commands
Options.OptionsContext.parse_cmd_args = wafsamba_options_parse_cmd_args
option_groups = {}
ctdb_configure_params = " --enable-developer ${PREFIX}"
samba_configure_params = " ${ENABLE_COVERAGE} ${PREFIX} --with-profiling-data --with-prometheus-exporter"
+# To test that waf copes with unknown arguments that look like
+# environment variables, we add a couple of parameters that should be
+# treated environment variables that happen to have no effect.
+#
+# This is for https://bugzilla.samba.org/show_bug.cgi?id=15990: distro
+# build systems do this kind of thing, and older versions of waf
+# allowed it.
+useless_configure_params = " _foobliosity_over_mud=7 GRISHLIHOOD_77=0"
+
rust_configure_param = ''
glibc_vers = float('.'.join(get_libc_version().split('.')[:2]))
cargo = shutil.which('cargo')
"samba-def-build": {
"git-clone-required": True,
"sequence": [
- ("configure", "./configure.developer" + samba_configure_params),
+ ("configure", "./configure.developer" + samba_configure_params + useless_configure_params),
("make", "make -j"),
("check-clean-tree", CLEAN_SOURCE_TREE_CMD),
("chmod-R-a-w", "chmod -R a-w ."),