Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | inherit python3native |
| 8 | |
| 9 | DEPENDS += "python3-scons-native" |
| 10 | |
| 11 | EXTRA_OESCONS ?= "" |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 12 | # This value below is derived from $(getconf ARG_MAX) |
| 13 | SCONS_MAXLINELENGTH ?= "MAXLINELENGTH=2097152" |
| 14 | EXTRA_OESCONS:append = " ${SCONS_MAXLINELENGTH}" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 15 | do_configure() { |
| 16 | if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then |
| 17 | if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then |
| 18 | ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} |
| 19 | fi |
| 20 | |
| 21 | mkdir -p `dirname ${CONFIGURESTAMPFILE}` |
| 22 | echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} |
| 23 | fi |
| 24 | } |
| 25 | |
| 26 | scons_do_compile() { |
| 27 | ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \ |
| 28 | die "scons build execution failed." |
| 29 | } |
| 30 | |
| 31 | scons_do_install() { |
| 32 | ${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \ |
| 33 | die "scons install execution failed." |
| 34 | } |
| 35 | |
Patrick Williams | 864cc43 | 2023-02-09 14:54:44 -0600 | [diff] [blame^] | 36 | do_configure[vardepsexclude] = "SCONS_MAXLINELENGTH" |
| 37 | do_compile[vardepsexclude] = "SCONS_MAXLINELENGTH" |
| 38 | do_install[vardepsexclude] = "SCONS_MAXLINELENGTH" |
| 39 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 40 | EXPORT_FUNCTIONS do_compile do_install |