aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorAleksey Gurtovoy <agurtovoy@acm.org>2019-08-09 16:06:47 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-09-05 23:42:47 +0300
commit75daed27bc4e363696157617c7461414fc4e707b (patch)
tree2863934de82e0a7cc6a3dcd9ee23b4c4e378c550 /mesonbuild/modules
parentcaec875fe1922b40037e1fd9229433ede64f9f25 (diff)
downloadmeson-75daed27bc4e363696157617c7461414fc4e707b.zip
meson-75daed27bc4e363696157617c7461414fc4e707b.tar.gz
meson-75daed27bc4e363696157617c7461414fc4e707b.tar.bz2
mesonlib.split_args/quote_arg/join_args
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/gnome.py11
-rw-r--r--mesonbuild/modules/pkgconfig.py2
2 files changed, 6 insertions, 7 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 4e97d3a..5c9d3dd 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -17,7 +17,6 @@ functionality such as gobject-introspection, gresources and gtk-doc'''
import os
import copy
-import shlex
import subprocess
from .. import build
@@ -29,7 +28,7 @@ from . import get_include_args
from . import ExtensionModule
from . import ModuleReturnValue
from ..mesonlib import (
- MachineChoice, MesonException, OrderedSet, Popen_safe, extract_as_list
+ MachineChoice, MesonException, OrderedSet, Popen_safe, extract_as_list, join_args
)
from ..dependencies import Dependency, PkgConfigDependency, InternalDependency
from ..interpreterbase import noKwargs, permittedKwargs, FeatureNew, FeatureNewKwargs
@@ -1079,12 +1078,12 @@ This will become a hard error in the future.''')
ldflags.extend(compiler_flags[1])
ldflags.extend(compiler_flags[2])
if compiler:
- args += ['--cc=%s' % ' '.join([shlex.quote(x) for x in compiler.get_exelist()])]
- args += ['--ld=%s' % ' '.join([shlex.quote(x) for x in compiler.get_linker_exelist()])]
+ args += ['--cc=%s' % join_args(compiler.get_exelist())]
+ args += ['--ld=%s' % join_args(compiler.get_linker_exelist())]
if cflags:
- args += ['--cflags=%s' % ' '.join([shlex.quote(x) for x in cflags])]
+ args += ['--cflags=%s' % join_args(cflags)]
if ldflags:
- args += ['--ldflags=%s' % ' '.join([shlex.quote(x) for x in ldflags])]
+ args += ['--ldflags=%s' % join_args(ldflags)]
return args
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index 78fffb1..60d4b3f 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -240,7 +240,7 @@ class PkgConfigModule(ExtensionModule):
def _escape(self, value):
'''
- We cannot use shlex.quote because it quotes with ' and " which does not
+ We cannot use quote_arg because it quotes with ' and " which does not
work with pkg-config and pkgconf at all.
'''
# We should always write out paths with / because pkg-config requires