Index: Source/core/scripts/InFilesCompiler.pm |
diff --git a/Source/core/scripts/InFilesCompiler.pm b/Source/core/scripts/InFilesCompiler.pm |
index 2e9b69b5db6719ddef30963ebde4941b7e271687..f8e4180cab15612ff2fdf0d245fdce3a83240b34 100644 |
--- a/Source/core/scripts/InFilesCompiler.pm |
+++ b/Source/core/scripts/InFilesCompiler.pm |
@@ -32,6 +32,7 @@ use File::Path; |
use File::Spec; |
use IO::File; |
use InFilesParser; |
+use idltopath; |
require Config; |
@@ -39,6 +40,7 @@ package InFilesCompiler; |
my $inputFile = ""; |
my $outputDir = "."; |
+my $idlToPathFile = ""; |
my $defaultItemFactory; |
my %parsedItems; |
@@ -91,10 +93,14 @@ sub initializeFromCommandLine() |
::GetOptions( |
'input=s' => \$inputFile, |
'outputDir=s' => \$outputDir, |
+ 'idltopathfile=s' => \$idlToPathFile, |
); |
die "You must specify --input <file>" unless length($inputFile); |
+ die "You must specify --idltopathfile" unless length($idlToPathFile); |
+ |
+ idltopath::initIdlToPath($idlToPathFile); |
::mkpath($outputDir); |
# FIXME: Should we provide outputDir via an accessor? |
@@ -123,6 +129,8 @@ sub license() |
return "/* |
* THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT. |
* |
+ * This file was generated by the make_names.pl/InFilesCompiler.pm script. |
+ * |
* Copyright (C) 2011 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
@@ -286,8 +294,16 @@ sub generateHeadersHeader() |
print F "#if " . $object->conditionalStringFromAttributeValue($conditional) . "\n" if $conditional; |
my $path = "$interfaceName.h"; |
+ if (!defined($parsedItemPaths{$itemName})) { |
+ print("Warning: Missing path for interface headers for " . $itemName . " in InFilesCompiler.pm\n"); |
+ my $path = idltopath::idlToPath($itemName); |
+ # Removing trailing '/' since we'll add it again here. |
+ chop($path); |
+ $parsedItemPaths{$itemName} = $path; |
+ } |
+# die "Unknown idl path for " . $itemName unless defined($parsedItemPaths{$itemName}); |
$path = $parsedItemPaths{$itemName} . "/" . $path if defined($parsedItemPaths{$itemName}); |
- print F "#include \"$path\"\n"; |
+ print F "#include \"./$path\"\n"; |
print F "#include \"V8$interfaceName.h\"\n"; |
print F "#endif\n" if $conditional; |
} |