From: ChenQi <Qi.Chen@windriver.com>
To: <yocto@yoctoproject.org>
Subject: Re: Detecting build type within recipe (target, native or nativesdk)
Date: Fri, 26 Jul 2013 10:04:54 +0800 [thread overview]
Message-ID: <51F1D946.4090207@windriver.com> (raw)
In-Reply-To: <51F1BB68.6010204@gna.org>
On 07/26/2013 07:57 AM, Christian Gagneraud wrote:
> Hi there,
>
> Is there a way to detect what kind of build is going on (target,
> native or nativesdk) from within a recipe or a class?
>
> Basically when using 'BBCLASSEXTEND = "native nativesdk"', how can I
> tweak the build behaviour depending of the build type?
>
> Does anyone know an example recipe I could use as a reference for
> doing these kind of things?
>
> Regards,
> Chris
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>
1. Use suffixes such as _class-native, _class-target, etc.
I think this is the preferred way.
Please grep the repo for more info.
2. Use ${PN} value.
e.g. (from dpkg.inc)
do_install_append () {
if [ "${PN}" = "dpkg-native" ]; then
# update-alternatives doesn't have an offline mode
rm ${D}${bindir}/update-alternatives
sed -i -e
's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|'
${D}${bindir}/dpkg-*
else
mv ${D}${bindir}/update-alternatives ${D}${sbindir}
sed -i -e
's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|'
${D}${bindir}/dpkg-*
fi
}
Best Regards,
Chen Qi
prev parent reply other threads:[~2013-07-26 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-25 23:57 Detecting build type within recipe (target, native or nativesdk) Christian Gagneraud
2013-07-26 2:04 ` ChenQi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F1D946.4090207@windriver.com \
--to=qi.chen@windriver.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.