From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Philip Tricca <flihp@twobit.us>
Cc: yocto@yoctoproject.org
Subject: Re: native recipe and sysroot-destdir troubles
Date: Sun, 15 Apr 2012 12:26:44 +0100 [thread overview]
Message-ID: <1334489204.16992.3.camel@ted> (raw)
In-Reply-To: <4F8897F0.9050104@twobit.us>
On Fri, 2012-04-13 at 17:17 -0400, Philip Tricca wrote:
> Worked out a solution to this issue. For the sake of brevity it can be
> found here:
>
> http://twobit.us/blog/2012/04/openembedded-yocto-native-hello-world/
So just to follow up here too for the list archives:
This “craziness” does have a rational explanation. “native” targets are
meant to run on the system they’re built on and run in the location
they’re installed to. This means they install to a destination of “/”
and PREFIX is inside the native sysroot directory.
We install them to a DESTDIR to allow us to manipulate them before they
then get moved to a final DESTDIR of “/”.
Most Makefiles handle this correctly by doing:
DESTDIR ?= “”
prefix ?= “/usrr”
bindir ?= “$(prefix)/bin”
and then, importantly, install in the form:
install -d $(DESTDIR)$(bindir)
so both prefix and DESTDIR are used. Whilst this is a convention, its a
widely adopted and followed one. As you’ve found, you can call into a
custom makefile and set the variables manually if the makefile doesn’t
follow the convention.
Cheers,
Richard
prev parent reply other threads:[~2012-04-15 11:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 14:44 native recipe and sysroot-destdir troubles Philip Tricca
2012-04-12 23:55 ` Philip Tricca
2012-04-13 21:17 ` Philip Tricca
2012-04-15 11:26 ` Richard Purdie [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=1334489204.16992.3.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=flihp@twobit.us \
--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.