diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/build/scripts/rule_bison.py')
-rwxr-xr-x[-rw-r--r--] | chromium/third_party/WebKit/Source/build/scripts/rule_bison.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py b/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py index 97a0541f4b5..870f3b56f28 100644..100755 --- a/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py +++ b/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py @@ -50,6 +50,13 @@ bisonExe = 'bison' if len(sys.argv) > 3: bisonExe = sys.argv[3] +pathToBison = os.path.split(bisonExe)[0] +if pathToBison: + # Make sure this path is in the path so that it can find its auxiliary + # binaries (in particular, m4). To avoid other 'm4's being found, insert + # at head, rather than tail. + os.environ['PATH'] = pathToBison + os.pathsep + os.environ['PATH'] + inputName = os.path.basename(inputFile) assert inputName == 'CSSGrammar.y' or inputName == 'XPathGrammar.y' prefix = {'CSSGrammar.y': 'cssyy', 'XPathGrammar.y': 'xpathyy'}[inputName] |