[GTK] Clean build is broken when using make -j
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 18:56:40 +0000 (18:56 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 18:56:40 +0000 (18:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76388

.:

* GNUmakefile.am: Add new global source list variables.

Source/WebCore:

No new tests. This is just a build fix.

Use order-only dependencies to ensure that built sources are built before
files that depend on them.

* GNUmakefile.am: Establish an order-only dependency on some built sources before starting
to build non-generated sources. Rename some temporary files and variables to be more consistent.
* bindings/gobject/GNUmakefile.am: Updated to reflect new variable names.

Source/WebKit2:

* GNUmakefile.am: Add some WebKit2 sources to global sources lists
so that we can refer to them in separate GNUmakefiles.

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

ChangeLog
GNUmakefile.am
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.am
Source/WebCore/bindings/gobject/GNUmakefile.am
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.am

index bff77b8..2d42f86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-02-22  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] Clean build is broken when using make -j
+        https://bugs.webkit.org/show_bug.cgi?id=76388
+
+        * GNUmakefile.am: Add new global source list variables.
+
 2012-02-20  Ryosuke Niwa  <rniwa@webkit.org>
 
         perf-o-matic: Extract logic to generate JSON responses as classes to unit test
index 68a1752..bb21631 100644 (file)
@@ -80,7 +80,9 @@ webkitgtk_cppflags :=
 webkitgtk_gdom_built_sources :=
 webkitgtk_built_sources :=
 webkitgtk_built_nosources :=
+webkit2_sources :=
 webkit2_built_sources :=
+webkit2_plugin_process_sources :=
 webkit2_plugin_process_built_sources :=
 webkittestrunner_built_sources :=
 libwebcoreinternals_built_sources :=
index 0c19294..9f43ed9 100644 (file)
@@ -1,3 +1,17 @@
+2012-02-22  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] Clean build is broken when using make -j
+        https://bugs.webkit.org/show_bug.cgi?id=76388
+
+        No new tests. This is just a build fix.
+
+        Use order-only dependencies to ensure that built sources are built before
+        files that depend on them.
+
+        * GNUmakefile.am: Establish an order-only dependency on some built sources before starting
+        to build non-generated sources. Rename some temporary files and variables to be more consistent.
+        * bindings/gobject/GNUmakefile.am: Updated to reflect new variable names.
+
 2012-02-22  Dana Jansens  <danakj@chromium.org>
 
         [Chromium] New CCOcclusionTracker class with tests
index ce9a5fa..2df6a36 100644 (file)
@@ -785,24 +785,32 @@ IDL_PATH := \
 
 vpath %.idl $(IDL_PATH)
 
-# This does not appear to work correctly with gnumake unless
-# it includes an empty command list (the semicolon).
-DerivedSources/WebCore/JS%.cpp: DerivedSources/WebCore/JS%.h;
-
-SUPPLEMENTAL_DEPENDENCY_FILE = $(top_builddir)/DerivedSources/WebCore/supplemental_dependency.tmp
-IDL_FILES_TMP = $(top_builddir)/DerivedSources/WebCore/idl_files.tmp
-IDL_ATTRIBUTES_FILE = $(WebCore)/bindings/scripts/IDLAttributes.txt
+supplemental_dependency_file = $(top_builddir)/DerivedSources/WebCore/idl_supplemental_dependencies
+idl_files_list = $(top_builddir)/DerivedSources/WebCore/idl_files_list
+idl_attributes_file = $(WebCore)/bindings/scripts/IDLAttributes.txt
 
 .SECONDARY:
-$(SUPPLEMENTAL_DEPENDENCY_FILE): $(SCRIPTS_FOR_RESOLVE_SUPPLEMENTAL) $(dom_binding_idls) $(IDL_ATTRIBUTES_FILE)
+$(supplemental_dependency_file): $(SCRIPTS_FOR_RESOLVE_SUPPLEMENTAL) $(dom_binding_idls) $(idl_attributes_file)
        $(AM_V_GEN)
-       $(AM_V_at)echo -n > $(IDL_FILES_TMP)
-       $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(IDL_FILES_TMP)
-       $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/resolve-supplemental.pl --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --idlFilesList $(IDL_FILES_TMP) --supplementalDependencyFile $@ --idlAttributesFile $(IDL_ATTRIBUTES_FILE)
+       $(AM_V_at)echo -n > $(idl_files_list)
+       $(AM_V_at)($(foreach idl, $(dom_binding_idls), echo $(idl) &&) echo -n) >> $(idl_files_list)
+       $(AM_V_at)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/resolve-supplemental.pl --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --idlFilesList $(idl_files_list) --supplementalDependencyFile $@ --idlAttributesFile $(idl_attributes_file)
+
+# This does not appear to work correctly with gnumake unless
+# it includes an empty command list (the semicolon).
+DerivedSources/WebCore/JS%.cpp: DerivedSources/WebCore/JS%.h;
 
 .SECONDARY:
-DerivedSources/WebCore/JS%.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(SUPPLEMENTAL_DEPENDENCY_FILE)
-       $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
+DerivedSources/WebCore/JS%.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorJS.pm $(supplemental_dependency_file)
+       $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl $(IDL_PATH:%=--include "%") --outputDir "$(GENSOURCES_WEBCORE)" --defines "LANGUAGE_JAVASCRIPT=1 $(FEATURE_DEFINES)" --generator JS --supplementalDependencyFile $(supplemental_dependency_file) $<
+
+# See https://bugs.webkit.org/show_bug.cgi?id=76388
+# We need to introduce a manual dependency to prevent non-generated sources from 
+# trying to build before the generated ones. This can happen if the supplemental
+# IDL generation takes a long time. The pipe represents an order-only dependency,
+# which means that GNUmake will only try to build the dependencies first, but
+# not rebuild all the targets if the dependencies change.
+$(webkitgtk_sources) $(webkit2_sources) $(webkit2_plugin_process_sources) $(webcore_sources) $(webcoregtk_sources) : | $(supplemental_dependency_file) $(webcore_built_sources)
 
 noinst_LTLIBRARIES += \
        libWebCore.la
index e8bf990..a51280f 100644 (file)
@@ -460,5 +460,5 @@ $(top_builddir)/DerivedSources/webkit/WebKitDOMCustom.h: $(WebCore)/bindings/gob
 
 # Filter out SVG and IndexedDB for now
 gdom_feature_defines := $(filter-out ENABLE_INDEXED_DATABASE=1, $(filter-out ENABLE_SVG%, $(FEATURE_DEFINES)))
-DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am $(SUPPLEMENTAL_DEPENDENCY_FILE)
-       $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(SUPPLEMENTAL_DEPENDENCY_FILE) $<
+DerivedSources/webkit/WebKitDOM%.cpp DerivedSources/webkit/WebKitDOM%.h DerivedSources/webkit/WebKitDOM%Private.h: %.idl $(SCRIPTS_FOR_GENERATE_BINDINGS) $(WebCore)/bindings/scripts/CodeGeneratorGObject.pm $(WebCore)/bindings/gobject/GNUmakefile.am $(supplemental_dependency_file)
+       $(AM_V_GEN)$(PERL) -I$(WebCore)/bindings/scripts $(WebCore)/bindings/scripts/generate-bindings.pl --include $(WebCore)/dom --include $(WebCore)/html --include $(WebCore)/css --include $(WebCore)/page --include $(WebCore)/xml --include $(WebCore)/svg --outputDir "$(GENSOURCES_WEBKIT)" --defines "LANGUAGE_GOBJECT=1 $(gdom_feature_defines)" --generator GObject --supplementalDependencyFile $(supplemental_dependency_file) $<
index 2e2ed36..3b34cc3 100644 (file)
@@ -1,3 +1,11 @@
+2012-02-22  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] Clean build is broken when using make -j
+        https://bugs.webkit.org/show_bug.cgi?id=76388
+
+        * GNUmakefile.am: Add some WebKit2 sources to global sources lists
+        so that we can refer to them in separate GNUmakefiles.
+
 2012-02-22  Antaryami Pandia  <antaryami.pandia@motorola.com>
 
         [GTK][WK2] Add WebGL WebSetting.
index 1e72053..0e13715 100644 (file)
@@ -195,7 +195,7 @@ BUILT_SOURCES += $(webkit2_built_sources)
 nodist_libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
        $(webkit2_built_sources)
 
-libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
+webkit2_sources += \
        Source/WebKit2/config.h \
        Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h \
        Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp \
@@ -959,6 +959,9 @@ libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOU
        Source/WebKit2/WebProcess/WebProcess.cpp \
        Source/WebKit2/WebProcess/WebProcess.h
 
+libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_SOURCES = \
+       $(webkit2_sources)
+
 libwebkit2gtk_@WEBKITGTK_API_MAJOR_VERSION@_@WEBKITGTK_API_MINOR_VERSION@_la_CPPFLAGS = \
        -fno-strict-aliasing \
        $(global_cppflags) \
@@ -1384,7 +1387,7 @@ webkit2_plugin_process_built_sources += \
 nodist_Programs_WebKitPluginProcess_SOURCES = $(webkit2_plugin_process_built_sources)
 BUILT_SOURCES += $(nodist_Programs_WebKitPluginProcess_SOURCES)
 
-Programs_WebKitPluginProcess_SOURCES = \
+webkit2_plugin_process_sources += \
        Source/WebKit2/Platform/CoreIPC/ArgumentCoder.h \
        Source/WebKit2/Platform/CoreIPC/ArgumentCoders.h \
        Source/WebKit2/Platform/CoreIPC/ArgumentCoders.cpp \
@@ -1472,6 +1475,8 @@ Programs_WebKitPluginProcess_SOURCES = \
        Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h \
        Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp \
        Source/WebKit2/gtk/PluginMainGtk.cpp
+Programs_WebKitPluginProcess_SOURCES = \
+       $(webkit2_plugin_process_sources)
 
 Programs_WebKitPluginProcess_LDADD = \
        -lpthread \