mirror of https://gitlab.com/ita1024/waf.git
Issue 1371
This commit is contained in:
parent
2f43179c39
commit
3884124886
|
@ -103,7 +103,7 @@ MACRO_TO_DEST_CPU = {
|
||||||
}
|
}
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
def parse_flags(self, line, uselib_store, env=None, force_static=False):
|
def parse_flags(self, line, uselib_store, env=None, force_static=False, posix=None):
|
||||||
"""
|
"""
|
||||||
Parse the flags from the input lines, and add them to the relevant use variables::
|
Parse the flags from the input lines, and add them to the relevant use variables::
|
||||||
|
|
||||||
|
@ -124,18 +124,21 @@ def parse_flags(self, line, uselib_store, env=None, force_static=False):
|
||||||
|
|
||||||
env = env or self.env
|
env = env or self.env
|
||||||
|
|
||||||
# append_unique is not always possible
|
# Issue 811 and 1371
|
||||||
# for example, apple flags may require both -arch i386 and -arch ppc
|
if posix is None:
|
||||||
|
posix = True
|
||||||
|
if '\\' in line:
|
||||||
|
posix = ('\\ ' in line) or ('\\\\' in line)
|
||||||
|
|
||||||
app = env.append_value
|
lex = shlex.shlex(line, posix=posix)
|
||||||
appu = env.append_unique
|
|
||||||
#lst = shlex.split(line)
|
|
||||||
# issue #811
|
|
||||||
lex = shlex.shlex(line, posix=False)
|
|
||||||
lex.whitespace_split = True
|
lex.whitespace_split = True
|
||||||
lex.commenters = ''
|
lex.commenters = ''
|
||||||
lst = list(lex)
|
lst = list(lex)
|
||||||
|
|
||||||
|
# append_unique is not always possible
|
||||||
|
# for example, apple flags may require both -arch i386 and -arch ppc
|
||||||
|
app = env.append_value
|
||||||
|
appu = env.append_unique
|
||||||
uselib = uselib_store
|
uselib = uselib_store
|
||||||
while lst:
|
while lst:
|
||||||
x = lst.pop(0)
|
x = lst.pop(0)
|
||||||
|
@ -338,7 +341,7 @@ def exec_cfg(self, kw):
|
||||||
kw['okmsg'] = 'yes'
|
kw['okmsg'] = 'yes'
|
||||||
|
|
||||||
define_it()
|
define_it()
|
||||||
self.parse_flags(ret, kw.get('uselib_store', kw['package'].upper()), kw.get('env', self.env), force_static=static)
|
self.parse_flags(ret, kw.get('uselib_store', kw['package'].upper()), kw.get('env', self.env), force_static=static, posix=kw.get('posix', None))
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
@conf
|
@conf
|
||||||
|
|
Loading…
Reference in New Issue