Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Unified Diff: Source/core/scripts/InFilesCompiler.pm

Issue 14456006: Fixes to make scripts generate includes with paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to a newer chromium version Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/core.gyp/scripts/action_makenames.py ('k') | Source/core/scripts/make_dom_exceptions.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/core.gyp/scripts/action_makenames.py ('k') | Source/core/scripts/make_dom_exceptions.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698