Title: [121966] trunk/Tools
- Revision
- 121966
- Author
- o...@webkit.org
- Date
- 2012-07-06 06:20:11 -0700 (Fri, 06 Jul 2012)
Log Message
[Qt] Make use of Qt5 qmake's changed makefile recursion behavior
When not using the -r option, qmake now interleaves qmake and make calls,
so we don't need custom logic for this. There's also an option to supress
the effect of the -r option, which we use to make WebKit.pro the only
project file parsed in a recursive qmake-run.
https://bugs.webkit.org/show_bug.cgi?id=90461
Patch by Oswald Buddenhagen <oswald.buddenha...@nokia.com> on 2012-07-06
Reviewed by Tor Arne Vestbø.
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/functions.prf:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (121965 => 121966)
--- trunk/Tools/ChangeLog 2012-07-06 13:18:47 UTC (rev 121965)
+++ trunk/Tools/ChangeLog 2012-07-06 13:20:11 UTC (rev 121966)
@@ -1,5 +1,21 @@
2012-07-06 Oswald Buddenhagen <oswald.buddenha...@nokia.com>
+ [Qt] Make use of Qt5 qmake's changed makefile recursion behavior
+
+ When not using the -r option, qmake now interleaves qmake and make calls,
+ so we don't need custom logic for this. There's also an option to supress
+ the effect of the -r option, which we use to make WebKit.pro the only
+ project file parsed in a recursive qmake-run.
+
+ https://bugs.webkit.org/show_bug.cgi?id=90461
+
+ Reviewed by Tor Arne Vestbø.
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/functions.prf:
+
+2012-07-06 Oswald Buddenhagen <oswald.buddenha...@nokia.com>
+
[Qt] Remove custom qmake logic for module creation
Qmake now has the necessary hooks to cleanly override the build locations.
Modified: trunk/Tools/qmake/mkspecs/features/default_post.prf (121965 => 121966)
--- trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-07-06 13:18:47 UTC (rev 121965)
+++ trunk/Tools/qmake/mkspecs/features/default_post.prf 2012-07-06 13:20:11 UTC (rev 121966)
@@ -236,8 +236,9 @@
}
}
-# Doing `$(MAKE) qmake' should recurse through all subdirs
-contains(TEMPLATE, subdirs):!no_recursive_qmake {
+# Doing '$(MAKE) qmake' should recurse through all subdirs. In Qt5, this is
+# automatic (for 'qmake_all', while 'qmake' does not enter subdirs at all).
+haveQt(4):contains(TEMPLATE, subdirs):!no_recursive_qmake {
recursive_qmake.target = qmake_all
# We could do this using CONFIG += recurse but that adds
@@ -273,7 +274,7 @@
}
incremental.target = incremental
-incremental.commands = $(MAKE) -f $(MAKEFILE) qmake && $(MAKE) -f $(MAKEFILE)
+incremental.commands = $(MAKE) -f $(MAKEFILE) qmake_all && $(MAKE) -f $(MAKEFILE)
QMAKE_EXTRA_TARGETS += incremental
# Don't set OBJECTS_DIR for subdirs, as that will unconditionally
Modified: trunk/Tools/qmake/mkspecs/features/functions.prf (121965 => 121966)
--- trunk/Tools/qmake/mkspecs/features/functions.prf 2012-07-06 13:18:47 UTC (rev 121965)
+++ trunk/Tools/qmake/mkspecs/features/functions.prf 2012-07-06 13:20:11 UTC (rev 121966)
@@ -137,35 +137,50 @@
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 instead of the default ones,
- # as the default ones depend on $(MAKEFILE), while we want to depend on *qmake_all.
- # Without this rule we end up running qmake twice for the derived sources, as well as
- # introducing a race condition where we run "qmake -o Makefile.DerivedSources" at the
- # same time as we run "make -f Makefile.DerivedSources", resulting in make reading a
- # half-written makefile.
- 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
+ haveQt(4) {
+ # Use a custom target for making the derived sources instead of the default ones,
+ # as the default ones depend on $(MAKEFILE), while we want to depend on *qmake_all.
+ # Without this rule we end up running qmake twice for the derived sources, as well as
+ # introducing a race condition where we run "qmake -o Makefile.DerivedSources" at the
+ # same time as we run "make -f Makefile.DerivedSources", resulting in make reading a
+ # half-written makefile.
+ 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" 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.
- target_make_qmake.target = $${second_base_target}-qmake_all
- target_make_qmake.depends = $${derived_make_for_qmake.target}
- QMAKE_EXTRA_TARGETS += target_make_qmake
+ # This target ensures that running "make qmake" 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.
+ target_make_qmake.target = $${second_base_target}-qmake_all
+ target_make_qmake.depends = $${derived_make_for_qmake.target}
+ QMAKE_EXTRA_TARGETS += target_make_qmake
- GNUmake {
- # This target ensures that running make before any makefiles have been created
- # will still force qmake and make to be run on the derived sources first.
- target_make.target = $$eval($${secondSubdir}.makefile)
+ GNUmake {
+ # This target ensures that running make before any makefiles have been created
+ # will still force qmake and make to be run on the derived sources first.
+ target_make.target = $$eval($${secondSubdir}.makefile)
- # We use order-only-prerequisites so that we can run make on the derived sources
- # without triggering a qmake run on the target due to updated dependencies.
- target_make.depends = "| $${first_base_target}-make_default-ordered"
+ # We use order-only-prerequisites so that we can run make on the derived sources
+ # without triggering a qmake run on the target due to updated dependencies.
+ target_make.depends = "| $${first_base_target}-make_default-ordered"
- QMAKE_EXTRA_TARGETS += target_make
+ QMAKE_EXTRA_TARGETS += target_make
+ }
+ } else {
+ # Qt5's qmake does most of the above for us already.
+
+ # 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.
+ target_make_qmake.target = $${second_base_target}-qmake_all
+ target_make_qmake.depends = $${first_base_target}
+ QMAKE_EXTRA_TARGETS += target_make_qmake
+
+ # Make things work even if qmake -r is used.
+ CONFIG += dont_recurse
}
export(SUBDIRS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes