diff options
author | Uri Simchoni <urisimchoni@gmail.com> | 2015-05-19 11:09:55 +0300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2015-05-20 11:19:11 +0200 |
commit | 56114bb6778a3515cf8da34a1413b86fe1f904ca (patch) | |
tree | 66352d901b4756e46a669b7c290feccff106d2ed /buildtools | |
parent | c244e7dc09e9c98f678cbe716fe2e640de0bd4c0 (diff) | |
download | samba-56114bb6778a3515cf8da34a1413b86fe1f904ca.tar.gz |
waf: allow cross-execute program to have arguments with spaces
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>
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_cross.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py index 8213e1718d3..8911d4c8b0f 100644 --- a/buildtools/wafsamba/samba_cross.py +++ b/buildtools/wafsamba/samba_cross.py @@ -2,6 +2,7 @@ import Utils, Logs, sys, os, Options, re from Configure import conf +import shlex real_Popen = None @@ -113,7 +114,7 @@ class cross_Popen(Utils.pproc.Popen): # 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, |