[OE-core] use of variables in module_do_{compile,install}
Andreas Oberritter
obi at opendreambox.org
Thu Feb 16 17:51:16 UTC 2012
Hi everybody,
module.bbclass currently contains the following two functions:
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
KERNEL_SRC=${STAGING_KERNEL_DIR} \
KERNEL_VERSION=${KERNEL_VERSION} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
AR="${KERNEL_AR}" \
${MAKE_TARGETS}
}
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
KERNEL_SRC=${STAGING_KERNEL_DIR} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
modules_install
}
How about changing them this way?
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake -C "${STAGING_KERNEL_DIR}" SUBDIRS="${S}"
}
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake -C "${STAGING_KERNEL_DIR}" SUBDIRS="${S}" \
DEPMOD=echo \
INSTALL_MOD_PATH="${D}" \
modules_install
}
We would become independent of variables like KERNEL_PATH and
KERNEL_SRC, which only match some arbitrarily chosen Makefiles.
Regards,
Andreas
More information about the Openembedded-core
mailing list