makeprop.pl script is called too many times during build
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jan 2015 19:38:43 +0000 (19:38 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jan 2015 19:38:43 +0000 (19:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=140756
<rdar://problem/19467942>

Reviewed by David Kilzer.

The makeprop.pl script was called 4 times (instead of once) during
build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
had 4 associated targets and thus was called 4 times (with the same
parameter). Calling it once is sufficient to generate all 4 files
that were marked as target. This patch uses an INTERMEDIATE target
instead so that we can indicate that several files are generated
by the same command.

I believe this may be the reason for the sporatic build failures
that look like:
"""
CSSPropertyNames.gperf: No keywords in input file!
calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
"""
The makeprop.pl script is generating gperf's input file and calling the
gperf executable on this file. If the script is executed several times
in parallel, it would explain the build failures as several instances
of makeprop.pl may be writing / reading from the same
CSSPropertyNames.gperf file.

* DerivedSources.make:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178929 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make

index 5cebf9a..90665bd 100644 (file)
@@ -1,3 +1,33 @@
+2015-01-22  Chris Dumez  <cdumez@apple.com>
+
+        makeprop.pl script is called too many times during build
+        https://bugs.webkit.org/show_bug.cgi?id=140756
+        <rdar://problem/19467942>
+
+        Reviewed by David Kilzer.
+
+        The makeprop.pl script was called 4 times (instead of once) during
+        build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
+        had 4 associated targets and thus was called 4 times (with the same
+        parameter). Calling it once is sufficient to generate all 4 files
+        that were marked as target. This patch uses an INTERMEDIATE target
+        instead so that we can indicate that several files are generated
+        by the same command.
+
+        I believe this may be the reason for the sporatic build failures
+        that look like:
+        """
+        CSSPropertyNames.gperf: No keywords in input file!
+        calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
+        """
+        The makeprop.pl script is generating gperf's input file and calling the
+        gperf executable on this file. If the script is executed several times
+        in parallel, it would explain the build failures as several instances
+        of makeprop.pl may be writing / reading from the same
+        CSSPropertyNames.gperf file.
+
+        * DerivedSources.make:
+
 2015-01-22  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r178894.
index 0513814..2ae19e2 100644 (file)
@@ -765,7 +765,9 @@ all : \
     $(WEB_DOM_HEADERS) \
     \
     CSSGrammar.cpp \
+    CSSPropertyNames.cpp \
     CSSPropertyNames.h \
+    CSSValueKeywords.cpp \
     CSSValueKeywords.h \
     ColorData.cpp \
     EventFactory.cpp \
@@ -820,11 +822,15 @@ WEBCORE_CSS_PROPERTY_NAMES := $(WebCore)/css/CSSPropertyNames.in
 WEBCORE_CSS_VALUE_KEYWORDS := $(WebCore)/css/CSSValueKeywords.in
 WEBCORE_CSS_VALUE_KEYWORDS := $(WEBCORE_CSS_VALUE_KEYWORDS) $(WebCore)/css/SVGCSSValueKeywords.in
 
-CSSPropertyNames.h StyleBuilder.cpp StylePropertyShorthandFunctions.h StylePropertyShorthandFunctions.cpp : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl bindings/scripts/preprocessor.pm $(PLATFORM_FEATURE_DEFINES)
+CSSPropertyNames.h CSSPropertyNames.cpp StyleBuilder.cpp StylePropertyShorthandFunctions.h StylePropertyShorthandFunctions.cpp : makeprop.intermediate
+.INTERMEDIATE : makeprop.intermediate
+makeprop.intermediate : $(WEBCORE_CSS_PROPERTY_NAMES) css/makeprop.pl bindings/scripts/preprocessor.pm $(PLATFORM_FEATURE_DEFINES)
        $(PERL) -pe '' $(WEBCORE_CSS_PROPERTY_NAMES) > CSSPropertyNames.in
        $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makeprop.pl" --defines "$(FEATURE_DEFINES)"
 
-CSSValueKeywords.h : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl bindings/scripts/preprocessor.pm $(PLATFORM_FEATURE_DEFINES)
+CSSValueKeywords.h CSSValueKeywords.cpp : makevalues.intermediate
+.INTERMEDIATE : makevalues.intermediate
+makevalues.intermediate : $(WEBCORE_CSS_VALUE_KEYWORDS) css/makevalues.pl bindings/scripts/preprocessor.pm $(PLATFORM_FEATURE_DEFINES)
        $(PERL) -pe '' $(WEBCORE_CSS_VALUE_KEYWORDS) > CSSValueKeywords.in
        $(PERL) -I$(WebCore)/bindings/scripts "$(WebCore)/css/makevalues.pl" --defines "$(FEATURE_DEFINES)"