When cross-compiling samba using the cross-execute method,
allow the cross-excute command to have arguments that contain
spaces by quoting them.
For example:
./configure --cross-compile '--cross-execute=ce-program "par am"'
In this case, for each cross test whose binary is /path/testprog,
waf shall run the equivalent of running from a shell:
ce-program "par am" /path/testprog
This is useful for passing an arbitrary argument list to a subprocess
of the cross-execute program, such as in buildtools/examples/run_on_target.py
Signed-off-by: Uri Simchoni <urisimchoni@gmail.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
import Utils, Logs, sys, os, Options, re
from Configure import conf
+import shlex
real_Popen = None
# when --cross-execute is set, then change the arguments
# to use the cross emulator
i = args.index('--cross-execute')
- newargs = args[i+1].split()
+ newargs = shlex.split(args[i+1])
newargs.extend(args[0:i])
if use_answers:
p = real_Popen(newargs,