diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-08 22:40:30 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-09 13:56:49 +0200 |
| commit | 7caede7850d7b33011a5a0e3124180db2f7a0d6c (patch) | |
| tree | 75e504c15ac33e38fb7ad58135e04662ecf25163 /classes | |
| parent | 56d2c7f18d5058a168df01d6a4797514a0f958b6 (diff) | |
| download | meta-qt5-7caede7850d7b33011a5a0e3124180db2f7a0d6c.tar.gz | |
qmake5: Fix cleaning separate build directory and use it by default
* "${B}/*" in quotes doesn't match anything, better to remove whole directory
(incluing .files) and recreate it
* not sure why I've added quotes after testing first version, we don't
expect B with spaces.. but I'm a bit scared with rm -rf ${SOME_VAR}
after one glibc upgrade cleaned my whole disk and attached NFS array
when OLD_LOCALE_PATH wasn't detected correctly...
* qmake works well with separate B, use it by default
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/qmake5_base.bbclass | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass index 9aeafd70..0bfacec3 100644 --- a/classes/qmake5_base.bbclass +++ b/classes/qmake5_base.bbclass | |||
| @@ -124,6 +124,33 @@ EOF | |||
| 124 | # TargetSpec The location where to install target mkspec | 124 | # TargetSpec The location where to install target mkspec |
| 125 | # HostSpec The location where to install host mkspec | 125 | # HostSpec The location where to install host mkspec |
| 126 | 126 | ||
| 127 | # qmake works fine with separate B, use it by default | ||
| 128 | SEPB = "${WORKDIR}/build" | ||
| 129 | B = "${SEPB}" | ||
| 130 | |||
| 131 | CONFIGURESTAMPFILE = "${WORKDIR}/qmake5_base_configure.sstate" | ||
| 132 | |||
| 133 | qmake5_base_preconfigure() { | ||
| 134 | if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then | ||
| 135 | if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then | ||
| 136 | echo "Previously configured separate build directory detected, cleaning ${B}" | ||
| 137 | rm -rf ${B} | ||
| 138 | mkdir ${B} | ||
| 139 | fi | ||
| 140 | fi | ||
| 141 | } | ||
| 142 | |||
| 143 | qmake5_base_postconfigure(){ | ||
| 144 | if [ -n "${CONFIGURESTAMPFILE}" ]; then | ||
| 145 | echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} | ||
| 146 | fi | ||
| 147 | } | ||
| 148 | |||
| 149 | EXTRAQCONFFUNCS ??= "" | ||
| 150 | |||
| 151 | do_configure[prefuncs] += "qmake5_base_preconfigure ${EXTRAQCONFFUNCS}" | ||
| 152 | do_configure[postfuncs] += "qmake5_base_postconfigure" | ||
| 153 | |||
| 127 | addtask generate_qt_config_file after do_patch before do_configure | 154 | addtask generate_qt_config_file after do_patch before do_configure |
| 128 | 155 | ||
| 129 | qmake5_base_do_configure () { | 156 | qmake5_base_do_configure () { |
