summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tools/ChangeLog14
-rw-r--r--Tools/qmake/mkspecs/features/configure.prf10
-rw-r--r--Tools/qmake/mkspecs/features/functions.prf19
3 files changed, 40 insertions, 3 deletions
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index e4bb73197..ee62ee985 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2013-02-19 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Skip the build with a warning if certain tools cannot be found in the PATH
+ https://bugs.webkit.org/show_bug.cgi?id=110215
+
+ Reviewed by Tor Arne Vestbø.
+
+ Check that gperf, python, ruby, perl, bison and flex are in the PATH before
+ continuing the build. Otherwise skip with an error message explaining which
+ programs are missing from the build.
+
+ * qmake/mkspecs/features/configure.prf:
+ * qmake/mkspecs/features/functions.prf:
+
2013-02-18 Simon Hausmann <simon.hausmann@digia.com>
[Qt] Disable the build if certain configure checks fail
diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf
index c093f3295..27adbaaff 100644
--- a/Tools/qmake/mkspecs/features/configure.prf
+++ b/Tools/qmake/mkspecs/features/configure.prf
@@ -111,11 +111,15 @@ defineTest(finalizeConfigure) {
# Sanity checks that would prevent us from building the whole project altogether.
!mac:!contains(QT_CONFIG,icu) {
- skipBuildReason = "ICU is required. To build QtWebKit with Qt 5 you need to build Qt 5 with libICU support. Check for ICU support being mentioned in qtbase/config.summary.")
+ addReasonForSkippingBuild("ICU is required. To build QtWebKit with Qt 5 you need to build Qt 5 with libICU support. Check for ICU support being mentioned in qtbase/config.summary.")
}
production_build:blackberry {
- skipBuildReason = "Build not supported on BB10 yet."
+ addReasonForSkippingBuild("Build not supported on BB10 yet.")
}
+ requiredPrograms = gperf python perl bison ruby flex
+ for(program, requiredPrograms): \
+ !programExistsInPath($$program): \
+ addReasonForSkippingBuild("Missing $$program from PATH")
# Detect changes to the configuration. Changes need a clean build.
webkit_configured {
@@ -232,7 +236,7 @@ defineTest(finalizeConfigure) {
}
!isEmpty(skipBuildReason) {
- log("$${EOL}WebKit build disabled: " $$skipBuildReason "$${EOL}$${EOL}")
+ log("$${EOL}The WebKit build was disabled for the following reasons: $$skipBuildReason $${EOL}$${EOL}")
SUBDIRS=
export(SUBDIRS)
} else {
diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
index 4477f8321..f9d2defe2 100644
--- a/Tools/qmake/mkspecs/features/functions.prf
+++ b/Tools/qmake/mkspecs/features/functions.prf
@@ -199,6 +199,25 @@ defineTest(haveQtModule) {
return(false)
}
+defineTest(programExistsInPath) {
+ win_cmd_shell: program = $${1}.exe
+ else: program = $$1
+
+ PATH = "$$(PATH)"
+ paths=$$split(PATH, $$QMAKE_DIRLIST_SEP)
+
+ GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin
+ exists($$GNUTOOLS_DIR): paths += $$GNUTOOLS_DIR
+
+ for(p, paths): exists($$p/$$program):return(true)
+ return(false)
+}
+
+defineTest(addReasonForSkippingBuild) {
+ skipBuildReason = "$$skipBuildReason$${EOL} * $$1"
+ export(skipBuildReason)
+}
+
defineTest(prependEach) {
unset(variable)
unset(prefix)