Title: [102987] trunk/Source/WebCore
Revision
102987
Author
[email protected]
Date
2011-12-15 15:10:33 -0800 (Thu, 15 Dec 2011)

Log Message

REGRESSION(r102663): generate-bindings.pl runs every time
https://bugs.webkit.org/show_bug.cgi?id=74481

Reviewed by Adam Barth.

See the comment #1 of bug 74481 for the cause of this bug.

This patch fixes generate-bindings.pl so that it generates .h and .cpp files
even for IDL files that do not need .h and .cpp files. This is just to prevent
build scripts from trying to generate .h and .cpp files at every build.

No new tests. No change in behavior.

* bindings/scripts/generate-bindings.pl:
(generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
that do not need .h and .cpp files.
* bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
* bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
* bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
* bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
* bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
* bindings/scripts/test/JS/JSTestSupplemental.h: Added.
* bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
* bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
* bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
* bindings/scripts/test/V8/V8TestSupplemental.h: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102986 => 102987)


--- trunk/Source/WebCore/ChangeLog	2011-12-15 22:53:53 UTC (rev 102986)
+++ trunk/Source/WebCore/ChangeLog	2011-12-15 23:10:33 UTC (rev 102987)
@@ -1,3 +1,32 @@
+2011-12-15  Kentaro Hara  <[email protected]>
+
+        REGRESSION(r102663): generate-bindings.pl runs every time
+        https://bugs.webkit.org/show_bug.cgi?id=74481
+
+        Reviewed by Adam Barth.
+
+        See the comment #1 of bug 74481 for the cause of this bug.
+
+        This patch fixes generate-bindings.pl so that it generates .h and .cpp files
+        even for IDL files that do not need .h and .cpp files. This is just to prevent
+        build scripts from trying to generate .h and .cpp files at every build.
+
+        No new tests. No change in behavior.
+
+        * bindings/scripts/generate-bindings.pl:
+        (generateEmptyHeaderAndCpp): Generates .h and .cpp files for IDL files
+        that do not need .h and .cpp files.
+        * bindings/scripts/test/CPP/CPPTestSupplemental.cpp: Added.
+        * bindings/scripts/test/CPP/CPPTestSupplemental.h: Added.
+        * bindings/scripts/test/GObject/GObjectTestSupplemental.cpp: Added.
+        * bindings/scripts/test/GObject/GObjectTestSupplemental.h: Added.
+        * bindings/scripts/test/JS/JSTestSupplemental.cpp: Added.
+        * bindings/scripts/test/JS/JSTestSupplemental.h: Added.
+        * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Added.
+        * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Added.
+        * bindings/scripts/test/V8/V8TestSupplemental.cpp: Added.
+        * bindings/scripts/test/V8/V8TestSupplemental.h: Added.
+
 2011-12-15  Jarred Nicholls  <[email protected]>
 
         Unreviewed build fix. Mac build broken when CSS Filters enabled.

Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings.pl (102986 => 102987)


--- trunk/Source/WebCore/bindings/scripts/generate-bindings.pl	2011-12-15 22:53:53 UTC (rev 102986)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings.pl	2011-12-15 23:10:33 UTC (rev 102987)
@@ -118,9 +118,8 @@
     }
 
     if (!$idlFound) {
-        if ($verbose) {
-            print "$targetIdlFile is supplementing another IDL file, and thus .h and .cpp for $targetIdlFile are not generated.\n";
-        }
+        # We generate empty .h and .cpp files just to tell build scripts that .h and .cpp files are created.
+        generateEmptyHeaderAndCpp($generator, $targetInterfaceName, $outputHeadersDirectory, $outputDirectory);
         exit 0;
     }
 }
@@ -238,3 +237,25 @@
 # Generate desired output for the target IDL file.
 my $codeGen = CodeGenerator->new(\@idlDirectories, $generator, $outputDirectory, $outputHeadersDirectory, 0, $preprocessor, $writeDependencies, $verbose);
 $codeGen->ProcessDocument($targetDocument, $defines);
+
+sub generateEmptyHeaderAndCpp
+{
+    my ($generator, $targetInterfaceName, $outputHeadersDirectory, $outputDirectory) = @_;
+
+    my $headerName = "${generator}${targetInterfaceName}.h";
+    my $cppName = "${generator}${targetInterfaceName}.cpp";
+    my $contents = "/*
+    This file is generated just to tell build scripts that $headerName and
+    $cppName are created for ${targetInterfaceName}.idl, and thus
+    prevent the build scripts from trying to generate $headerName and
+    $cppName at every build. This file must not be tried to compile.
+*/
+";
+    open FH, "> ${outputHeadersDirectory}/${headerName}" or die "Cannot open $headerName\n";
+    print FH $contents;
+    close FH;
+
+    open FH, "> ${outputDirectory}/${cppName}" or die "Cannot open $cppName\n";
+    print FH $contents;
+    close FH;
+}

Added: trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.cpp (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.cpp	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that CPPTestSupplemental.h and
+    CPPTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate CPPTestSupplemental.h and
+    CPPTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.h (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/CPPTestSupplemental.h	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that CPPTestSupplemental.h and
+    CPPTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate CPPTestSupplemental.h and
+    CPPTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.cpp (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.cpp	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that GObjectTestSupplemental.h and
+    GObjectTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate GObjectTestSupplemental.h and
+    GObjectTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.h (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/GObjectTestSupplemental.h	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that GObjectTestSupplemental.h and
+    GObjectTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate GObjectTestSupplemental.h and
+    GObjectTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.cpp (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.cpp	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that JSTestSupplemental.h and
+    JSTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate JSTestSupplemental.h and
+    JSTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.h (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSupplemental.h	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that JSTestSupplemental.h and
+    JSTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate JSTestSupplemental.h and
+    JSTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that ObjCTestSupplemental.h and
+    ObjCTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate ObjCTestSupplemental.h and
+    ObjCTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.h (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/ObjCTestSupplemental.h	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that ObjCTestSupplemental.h and
+    ObjCTestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate ObjCTestSupplemental.h and
+    ObjCTestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.cpp (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.cpp	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that V8TestSupplemental.h and
+    V8TestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate V8TestSupplemental.h and
+    V8TestSupplemental.cpp at every build. This file must not be tried to compile.
+*/

Added: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.h (0 => 102987)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.h	                        (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestSupplemental.h	2011-12-15 23:10:33 UTC (rev 102987)
@@ -0,0 +1,6 @@
+/*
+    This file is generated just to tell build scripts that V8TestSupplemental.h and
+    V8TestSupplemental.cpp are created for TestSupplemental.idl, and thus
+    prevent the build scripts from trying to generate V8TestSupplemental.h and
+    V8TestSupplemental.cpp at every build. This file must not be tried to compile.
+*/
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to