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>
This commit is contained in:
parent
56d2c7f18d
commit
7caede7850
|
@ -124,6 +124,33 @@ EOF
|
||||||
# TargetSpec The location where to install target mkspec
|
# TargetSpec The location where to install target mkspec
|
||||||
# HostSpec The location where to install host mkspec
|
# HostSpec The location where to install host mkspec
|
||||||
|
|
||||||
|
# qmake works fine with separate B, use it by default
|
||||||
|
SEPB = "${WORKDIR}/build"
|
||||||
|
B = "${SEPB}"
|
||||||
|
|
||||||
|
CONFIGURESTAMPFILE = "${WORKDIR}/qmake5_base_configure.sstate"
|
||||||
|
|
||||||
|
qmake5_base_preconfigure() {
|
||||||
|
if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
|
||||||
|
if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
|
||||||
|
echo "Previously configured separate build directory detected, cleaning ${B}"
|
||||||
|
rm -rf ${B}
|
||||||
|
mkdir ${B}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
qmake5_base_postconfigure(){
|
||||||
|
if [ -n "${CONFIGURESTAMPFILE}" ]; then
|
||||||
|
echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
EXTRAQCONFFUNCS ??= ""
|
||||||
|
|
||||||
|
do_configure[prefuncs] += "qmake5_base_preconfigure ${EXTRAQCONFFUNCS}"
|
||||||
|
do_configure[postfuncs] += "qmake5_base_postconfigure"
|
||||||
|
|
||||||
addtask generate_qt_config_file after do_patch before do_configure
|
addtask generate_qt_config_file after do_patch before do_configure
|
||||||
|
|
||||||
qmake5_base_do_configure () {
|
qmake5_base_do_configure () {
|
||||||
|
|
|
@ -11,19 +11,10 @@ require qt5_arch.inc
|
||||||
|
|
||||||
QT_MODULE ?= "${BPN}"
|
QT_MODULE ?= "${BPN}"
|
||||||
|
|
||||||
SEPB = "${WORKDIR}/build"
|
|
||||||
B = "${SEPB}"
|
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
set_arch
|
set_arch
|
||||||
set_endian
|
set_endian
|
||||||
|
|
||||||
# Similar logic is in autotools.bbclass
|
|
||||||
if [ -d ${B} -a "${S}" != "${B}" ] ; then
|
|
||||||
# Existing separate build directory, exists, remove
|
|
||||||
rm -rf "${B}/*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
qmake5_base_do_configure
|
qmake5_base_do_configure
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,6 @@ SRC_URI += " \
|
||||||
# specific for native version
|
# specific for native version
|
||||||
SRC_URI += "file://0001-Always-build-uic.patch"
|
SRC_URI += "file://0001-Always-build-uic.patch"
|
||||||
|
|
||||||
SEPB = "${WORKDIR}/build"
|
|
||||||
B = "${SEPB}"
|
|
||||||
|
|
||||||
QT_CONF_PATH = "${B}/qt.conf"
|
QT_CONF_PATH = "${B}/qt.conf"
|
||||||
|
|
||||||
do_generate_qt_config_file() {
|
do_generate_qt_config_file() {
|
||||||
|
@ -86,12 +83,6 @@ export OE_QMAKE_AR
|
||||||
export OE_QMAKE_STRIP
|
export OE_QMAKE_STRIP
|
||||||
|
|
||||||
do_configure_prepend() {
|
do_configure_prepend() {
|
||||||
# Similar logic is in autotools.bbclass
|
|
||||||
if [ -d ${B} -a "${S}" != "${B}" ] ; then
|
|
||||||
# Existing separate build directory, exists, remove
|
|
||||||
rm -rf "${B}/*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
(echo o; echo yes) | ${S}/configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
|
(echo o; echo yes) | ${S}/configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
|
||||||
bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}"
|
bin/qmake ${OE_QMAKE_DEBUG_OUTPUT} ${S} -o Makefile || die "Configuring qt with qmake failed. EXTRA_OECONF was ${EXTRA_OECONF}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,12 +105,6 @@ do_configure() {
|
||||||
set_arch
|
set_arch
|
||||||
set_endian
|
set_endian
|
||||||
|
|
||||||
# Similar logic is in autotools.bbclass
|
|
||||||
if [ -d ${B} -a "${S}" != "${B}" ] ; then
|
|
||||||
# Existing separate build directory, exists, remove
|
|
||||||
rm -rf "${B}/*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# we need symlink in path relative to source, because
|
# we need symlink in path relative to source, because
|
||||||
# EffectivePaths:Prefix is relative to qmake location
|
# EffectivePaths:Prefix is relative to qmake location
|
||||||
if [ ! -e ${B}/bin/qmake ]; then
|
if [ ! -e ${B}/bin/qmake ]; then
|
||||||
|
|
|
@ -17,16 +17,7 @@ SRC_URI += "\
|
||||||
file://0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch \
|
file://0001-Install-the-mkv8snapshot-tool-to-the-native-side.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SEPB = "${WORKDIR}/build"
|
|
||||||
B = "${SEPB}"
|
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
# Similar logic is in autotools.bbclass
|
|
||||||
if [ -d ${B} -a "${S}" != "${B}" ] ; then
|
|
||||||
# Existing separate build directory, exists, remove
|
|
||||||
rm -rf "${B}/*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}
|
${OE_QMAKE_QMAKE} ${OE_QMAKE_DEBUG_OUTPUT} -r ${S}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,5 @@ INC_PR = "r0"
|
||||||
|
|
||||||
do_configure_append() {
|
do_configure_append() {
|
||||||
# Fix rpaths for QtWebProcess
|
# Fix rpaths for QtWebProcess
|
||||||
find -name "Makefile*" | xargs sed -i "s|-Wl,-rpath,${SEPB}/lib||g"
|
find -name "Makefile*" | xargs sed -i "s|-Wl,-rpath,${B}/lib||g"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue