blob: 80f8382107dc23027f61de91d0a210ce07ef952b [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001inherit python3native
2
3DEPENDS += "python3-scons-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5EXTRA_OESCONS ?= ""
6
Brad Bishop19323692019-04-05 15:28:33 -04007do_configure() {
Andrew Geissler595f6302022-01-24 19:11:47 +00008 if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then
Brad Bishop19323692019-04-05 15:28:33 -04009 if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
Andrew Geissler595f6302022-01-24 19:11:47 +000010 ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
Brad Bishop19323692019-04-05 15:28:33 -040011 fi
12
13 mkdir -p `dirname ${CONFIGURESTAMPFILE}`
14 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
15 fi
16}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050017
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018scons_do_compile() {
Andrew Geissler595f6302022-01-24 19:11:47 +000019 ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
Brad Bishop19323692019-04-05 15:28:33 -040020 die "scons build execution failed."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021}
22
23scons_do_install() {
Andrew Geissler595f6302022-01-24 19:11:47 +000024 ${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
Brad Bishop19323692019-04-05 15:28:33 -040025 die "scons install execution failed."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026}
27
28EXPORT_FUNCTIONS do_compile do_install