summaryrefslogtreecommitdiffstats
path: root/webkit/build
diff options
context:
space:
mode:
authordglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 20:08:44 +0000
committerdglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 20:08:44 +0000
commite8dec209df749eac3a3e566d96d0fdde3dadbe1e (patch)
treec42f7a5426f642d8b436992294ad813ec68fa94e /webkit/build
parentcfbcbc47b15a780f64cb1236a7b5b5661ed5d5bb (diff)
downloadchromium_src-e8dec209df749eac3a3e566d96d0fdde3dadbe1e.zip
chromium_src-e8dec209df749eac3a3e566d96d0fdde3dadbe1e.tar.gz
chromium_src-e8dec209df749eac3a3e566d96d0fdde3dadbe1e.tar.bz2
Proper fix for the "thousands of macro names must be identifiers" bug.
This is all mmentovai. I am just a copier/paster. R=mark BUG=15904 TEST=no more "macro names must be identifiers" errors during V8 bindings generation. Review URL: http://codereview.chromium.org/149207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-xwebkit/build/rule_binding.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/webkit/build/rule_binding.py b/webkit/build/rule_binding.py
index ab74f0d..9555d4d 100755
--- a/webkit/build/rule_binding.py
+++ b/webkit/build/rule_binding.py
@@ -19,6 +19,7 @@
import errno
import os
+import shlex
import shutil
import subprocess
import sys
@@ -68,14 +69,20 @@ def main(args):
if not include_dir in include_dirs:
include_dirs.append(include_dir)
+ # The defines come in as one flat string. Split it up into distinct arguments.
+ if '--defines' in options:
+ defines_index = options.index('--defines')
+ if defines_index + 1 < len(options):
+ split_options = shlex.split(options[defines_index + 1])
+ if split_options:
+ options[defines_index + 1] = ' '.join(split_options)
+
# Build up the command.
command = ['perl', '-w']
for include_dir in include_dirs:
command.extend(['-I', include_dir])
command.append(generate_bindings)
- # Remove any qouble qoutes that may have gotten in here. We know that none of
- # the options will have meaningful double qoutes.
- command.extend([option.replace('"', '') for option in options])
+ command.extend(options)
command.extend(['--outputDir', cppdir, input])
# Do it. check_call is new in 2.5, so simulate its behavior with call and