Title: [127583] trunk/Tools
- Revision
- 127583
- Author
- ves...@webkit.org
- Date
- 2012-09-05 06:11:35 -0700 (Wed, 05 Sep 2012)
Log Message
[Qt] Fix makefile race condition between derived sources and target
r121966 removed too much of the old qmake logic, including the rule
that ensured that qmake_all would not trigger dual runs of qmake --
one of the derived sources -qmake-all rule, and one for making the
derived sources.
We now follow a similar pattern as before, by introducing a custom
target that explicitly depends on the derived sources' qmake-all before
doing a manual run of make. That ensures a single qmake run for the derived
sources.
https://bugs.webkit.org/show_bug.cgi?id=93847
Reviewed by Csaba Osztrogonác.
* qmake/mkspecs/features/functions.prf:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (127582 => 127583)
--- trunk/Tools/ChangeLog 2012-09-05 13:06:01 UTC (rev 127582)
+++ trunk/Tools/ChangeLog 2012-09-05 13:11:35 UTC (rev 127583)
@@ -1,3 +1,23 @@
+2012-09-05 Tor Arne Vestbø <tor.arne.ves...@nokia.com>
+
+ [Qt] Fix makefile race condition between derived sources and target
+
+ r121966 removed too much of the old qmake logic, including the rule
+ that ensured that qmake_all would not trigger dual runs of qmake --
+ one of the derived sources -qmake-all rule, and one for making the
+ derived sources.
+
+ We now follow a similar pattern as before, by introducing a custom
+ target that explicitly depends on the derived sources' qmake-all before
+ doing a manual run of make. That ensures a single qmake run for the derived
+ sources.
+
+ https://bugs.webkit.org/show_bug.cgi?id=93847
+
+ Reviewed by Csaba Osztrogonác.
+
+ * qmake/mkspecs/features/functions.prf:
+
2012-09-05 Christophe Dumez <christophe.du...@intel.com>
WKTR doesn't implement dumpWillCacheResponse()
Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (127582 => 127583)
--- trunk/Tools/qmake/mkspecs/features/functions.prf 2012-09-05 13:06:01 UTC (rev 127582)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf 2012-09-05 13:11:35 UTC (rev 127583)
@@ -137,12 +137,22 @@
first_base_target = sub-$$replace(firstSubdirFile, [^a-zA-Z0-9_], -)
second_base_target = sub-$$replace(secondSubdirFile, [^a-zA-Z0-9_], -)
+ # Use a custom target for making the derived sources, as the default target
+ # will do 'test -f $(MAKEFILE).DerivedSources || $(QMAKE) ...', which clashes
+ # with the qmake-run of the -qmake_all target, and we end up with a race
+ # and potentially half-written makefiles. The custom target depends explicitly
+ # on -qmake_all, to ensure that we have a makefile, and then calls make.
+ derived_make_for_qmake.target = $${first_base_target}-make_for_qmake
+ derived_make_for_qmake.depends = $${first_base_target}-qmake_all
+ derived_make_for_qmake.commands = $(MAKE) -f $$eval($${firstSubdir}.makefile)
+ QMAKE_EXTRA_TARGETS += derived_make_for_qmake
+
# This target ensures that running "make qmake_all" will force both qmake and make
# to be run on the derived sources before running qmake on the target, so that
# qmake can pick up the right dependencies for the target based on the derived
- # sources that were generated. Just "make qmake" is non-recursive anyway.
+ # sources that were generated.
target_make_qmake.target = $${second_base_target}-qmake_all
- target_make_qmake.depends = $${first_base_target}
+ target_make_qmake.depends = $${derived_make_for_qmake.target}
QMAKE_EXTRA_TARGETS += target_make_qmake
# Make things work even if qmake -r is used.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes