Openembedded Core Discussions
 help / color / mirror / Atom feed
* use of variables in module_do_{compile,install}
@ 2012-02-16 17:51 Andreas Oberritter
  0 siblings, 0 replies; only message in thread
From: Andreas Oberritter @ 2012-02-16 17:51 UTC (permalink / raw)
  To: openembedded-core

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-16 17:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 17:51 use of variables in module_do_{compile,install} Andreas Oberritter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox