Changeset 143326 in webkit


Ignore:
Timestamp:
Feb 19, 2013 6:43:09 AM (11 years ago)
Author:
Simon Hausmann
Message:

[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:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r143323 r143326  
     12013-02-19  Simon Hausmann  <simon.hausmann@digia.com>
     2
     3        [Qt] Skip the build with a warning if certain tools cannot be found in the PATH
     4        https://bugs.webkit.org/show_bug.cgi?id=110215
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        Check that gperf, python, ruby, perl, bison and flex are in the PATH before
     9        continuing the build. Otherwise skip with an error message explaining which
     10        programs are missing from the build.
     11
     12        * qmake/mkspecs/features/configure.prf:
     13        * qmake/mkspecs/features/functions.prf:
     14
    1152013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/Tools/qmake/mkspecs/features/configure.prf

    r143201 r143326  
    112112    # Sanity checks that would prevent us from building the whole project altogether.
    113113    !mac:!contains(QT_CONFIG,icu) {
    114         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.")
     114        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.")
    115115    }
    116116    production_build:blackberry {
    117         skipBuildReason = "Build not supported on BB10 yet."
    118     }
     117        addReasonForSkippingBuild("Build not supported on BB10 yet.")
     118    }
     119    requiredPrograms = gperf python perl bison ruby flex
     120    for(program, requiredPrograms): \
     121        !programExistsInPath($$program): \
     122            addReasonForSkippingBuild("Missing $$program from PATH")
    119123
    120124    # Detect changes to the configuration. Changes need a clean build.
     
    234238
    235239        !isEmpty(skipBuildReason) {
    236             log("$${EOL}WebKit build disabled: " $$skipBuildReason "$${EOL}$${EOL}")
     240            log("$${EOL}The WebKit build was disabled for the following reasons: $$skipBuildReason $${EOL}$${EOL}")
    237241            SUBDIRS=
    238242            export(SUBDIRS)
  • trunk/Tools/qmake/mkspecs/features/functions.prf

    r142088 r143326  
    204204}
    205205
     206defineTest(programExistsInPath) {
     207    win_cmd_shell: program = $${1}.exe
     208    else: program = $$1
     209
     210    PATH = "$$(PATH)"
     211    paths=$$split(PATH, $$QMAKE_DIRLIST_SEP)
     212
     213    GNUTOOLS_DIR=$$[QT_HOST_DATA]/../gnuwin32/bin
     214    exists($$GNUTOOLS_DIR): paths += $$GNUTOOLS_DIR
     215
     216    for(p, paths): exists($$p/$$program):return(true)
     217    return(false)
     218}
     219
     220defineTest(addReasonForSkippingBuild) {
     221    skipBuildReason = "$$skipBuildReason$${EOL}    * $$1"
     222    export(skipBuildReason)
     223}
     224
    206225defineTest(prependEach) {
    207226    unset(variable)
Note: See TracChangeset for help on using the changeset viewer.