mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
SCons has a slightly unusual implementation of out-of-tree builds where
there is no standard way of doing it. However, if a recipe sets B to
the idiomatic ${WORKDIR}/build and passes the right arguments so that this
is used then scons will fail as it is trying to find the SConstruct file
in ${B} not ${S}.
Always pass --directory=${S} to scons so that the SConstruct file can be
found, and don't call --clean if out-of-tree builds are being used as
we would have just deleted the entire build tree already.
(From OE-Core rev: 88d77d82ee506576988936e06b8d624879a80f2e)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
915 B
Plaintext
29 lines
915 B
Plaintext
inherit python3native
|
|
|
|
DEPENDS += "python3-scons-native"
|
|
|
|
EXTRA_OESCONS ?= ""
|
|
|
|
do_configure() {
|
|
if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
|
|
if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
|
|
${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
|
|
fi
|
|
|
|
mkdir -p `dirname ${CONFIGURESTAMPFILE}`
|
|
echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
|
|
fi
|
|
}
|
|
|
|
scons_do_compile() {
|
|
${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
|
|
die "scons build execution failed."
|
|
}
|
|
|
|
scons_do_install() {
|
|
${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
|
|
die "scons install execution failed."
|
|
}
|
|
|
|
EXPORT_FUNCTIONS do_compile do_install
|