mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 914935 - Fix pymake handling of colon in includedep files. r=gps
This commit is contained in:
parent
155cea62e2
commit
340d9d2fda
@ -372,6 +372,9 @@ def parsefile(pathname):
|
||||
pathname = os.path.realpath(pathname)
|
||||
return _parsecache.get(pathname)
|
||||
|
||||
# colon followed by anything except a slash (Windows path detection)
|
||||
_depfilesplitter = re.compile(r':(?![\\/])')
|
||||
|
||||
def parsedepfile(pathname):
|
||||
"""
|
||||
Parse a filename listing only depencencies into a parserdata.StatementList.
|
||||
@ -394,7 +397,7 @@ def parsedepfile(pathname):
|
||||
pathname = os.path.realpath(pathname)
|
||||
stmts = parserdata.StatementList()
|
||||
for line in continuation_iter(open(pathname).readlines()):
|
||||
target, deps = line.split(":", 1)
|
||||
target, deps = _depfilesplitter.split(line, 1)
|
||||
stmts.append(parserdata.Rule(data.StringExpansion(target, None),
|
||||
data.StringExpansion(deps, None), False))
|
||||
return stmts
|
||||
|
Loading…
Reference in New Issue
Block a user