summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhausmann@webkit.org <hausmann@webkit.org>2013-02-19 14:43:09 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 22:08:13 +0100
commit6b55893ad026f2b95ea6f268eefdeb204a1a134c (patch)
tree8682afe966865b58d11c3cd5d69c4817278f59c5
parent99be50464a52281c481dd8221144603fed582aa0 (diff)
downloadqtwebkit-6b55893ad026f2b95ea6f268eefdeb204a1a134c.tar.gz
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: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143326 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: Iff2331e681d421c1ef0f476c73c9a05ebcfcbec1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-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)