diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-01 23:43:25 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-01 23:43:25 +0200 |
commit | 5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1 (patch) | |
tree | 381dbfcca4785458612c36fd7acb1b7f700de6f5 /shellgenerator.py | |
parent | 016b9093d72d6c9cb3e7057d1143d0603abe525e (diff) | |
download | meson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.zip meson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.tar.gz meson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.tar.bz2 |
Moved quoting function.
Diffstat (limited to 'shellgenerator.py')
-rwxr-xr-x | shellgenerator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/shellgenerator.py b/shellgenerator.py index 49267f3..4ce023f 100755 --- a/shellgenerator.py +++ b/shellgenerator.py @@ -16,6 +16,9 @@ import os, stat +def shell_quote(cmdlist): + return ["'" + x + "'" for x in cmdlist] + class ShellGenerator(): def __init__(self, interpreter, environment): @@ -57,7 +60,7 @@ class ShellGenerator(): commands.append(abs_src) commands += compiler.get_output_flags() commands.append(abs_obj) - quoted = environment.shell_quote(commands) + quoted = shell_quote(commands) outfile.write('\necho Compiling \\"%s\\"\n' % src) outfile.write(' '.join(quoted) + ' || exit\n') return abs_obj @@ -71,7 +74,7 @@ class ShellGenerator(): commands += dep.get_link_flags() commands += linker.get_output_flags() commands.append(outname) - quoted = environment.shell_quote(commands) + quoted = shell_quote(commands) outfile.write('\necho Linking \\"%s\\".\n' % outname) outfile.write(' '.join(quoted) + ' || exit\n') |