Index: Source/core/core.gyp/scripts/action_makenames.py |
diff --git a/Source/core/core.gyp/scripts/action_makenames.py b/Source/core/core.gyp/scripts/action_makenames.py |
index 4cf45cd6c988328d6b2acdc9f3eff1746f656f62..bd07af4941b4e80d37724b2b74c2cefa94c726e1 100644 |
--- a/Source/core/core.gyp/scripts/action_makenames.py |
+++ b/Source/core/core.gyp/scripts/action_makenames.py |
@@ -87,7 +87,11 @@ def SplitArgsIntoSections(args): |
def main(args): |
- sections = SplitArgsIntoSections(args[1:]) |
+ if args[1] != "--idlToPathFile" or len(args) < 3: |
+ print "FATAL: Missing --idlToPathFile argument: " + str(args) |
+ return 1 |
+ idlToPathFile = args[2] |
+ sections = SplitArgsIntoSections(args[3:]) |
assert len(sections) == 2 or len(sections) == 3 |
(outputs, inputs) = sections[:2] |
if len(sections) == 3: |
@@ -131,10 +135,10 @@ def main(args): |
eventsInput = inputAbsPosix |
elif inputBasename.endswith('Names.in'): |
options.append(inputAbsPosix) |
- elif inputBasename.endswith('.pm'): |
+ elif inputBasename.endswith('.pm') or inputBasename.endswith('.py'): |
continue |
else: |
- assert False |
+ assert False, "Unexcepted file type "+ inputeBasename |
assert makeNamesInput != None |
assert tagInput != None or attrInput != None or eventsInput != None or ('--fonts' in options) |
@@ -144,18 +148,23 @@ def main(args): |
scriptsPath = os.path.normpath( |
os.path.join(os.path.dirname(makeNamesInput), os.pardir, 'scripts')) |
+ # bindingsScriptPath is a Perl include directory for some helper libraries make_names.pl uses. |
+ bindingsScriptPath = os.path.normpath( |
+ os.path.join(os.path.dirname(makeNamesInput), os.pardir, os.pardir, 'bindings', 'scripts')) |
+ |
# Change to the output directory because make_names.pl puts output in its |
# working directory. |
os.chdir(outputDir) |
# Build up the command. |
- command = ['perl', '-I', scriptsPath, makeNamesInput] |
+ command = ['perl', '-I', scriptsPath, '-I', bindingsScriptPath, makeNamesInput] |
if tagInput != None: |
command.extend(['--tags', tagInput]) |
if attrInput != None: |
command.extend(['--attrs', attrInput]) |
if eventsInput != None: |
command.extend(['--input', eventsInput]) |
+ command.extend(['--idltopathfile', idlToPathFile]) |
command.extend(options) |
# Do it. check_call is new in 2.5, so simulate its behavior with call and |