aboutsummaryrefslogtreecommitdiff
path: root/shellgenerator.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-01 23:43:25 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-01 23:43:25 +0200
commit5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1 (patch)
tree381dbfcca4785458612c36fd7acb1b7f700de6f5 /shellgenerator.py
parent016b9093d72d6c9cb3e7057d1143d0603abe525e (diff)
downloadmeson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.zip
meson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.tar.gz
meson-5e51c526a17b4f2c34e1bcc9d2809ac3f1f200c1.tar.bz2
Moved quoting function.
Diffstat (limited to 'shellgenerator.py')
-rwxr-xr-xshellgenerator.py7
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')