Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 914935 - Fix pymake handling of colon in includedep files. r=gps
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Sep 11, 2013
1 parent c717af2 commit 1a70118
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/pymake/pymake/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -394,7 +397,7 @@ def continuation_iter(lines):
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
Expand Down

0 comments on commit 1a70118

Please sign in to comment.