Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Quentin Schulz" <quentin.schulz@streamunlimited.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] follow up: keeping the source with an "externalsrc"-based recipe
Date: Mon, 31 May 2021 10:56:55 +0200	[thread overview]
Message-ID: <20210531085655.tdj73iny3mxhz22a@qschulz> (raw)
In-Reply-To: <8fbd5dac-a514-48b-bc14-54b3db5411b6@crashcourse.ca>

Hi Robert,

On Fri, May 28, 2021 at 05:02:13PM -0400, Robert P. J. Day wrote:
> On Fri, 28 May 2021, Quentin Schulz wrote:
> 
> ... big snip ...
> 
> > ${B} = ${S} by default, so that might explain why it works without
> > externalsrc being inherited.
> >
> > You can see in the makefile that this is assumed. Only the install tasks
> > are installing somewhere else (DESTDIR), c.f.
> > https://git.savannah.nongnu.org/cgit/dmidecode.git/tree/Makefile
> >
> > So yes, except if you patch the Makefile to support out-of-tree build,
> > you would need both EXTERNALSRC and EXTERNALSRC_BUILD set to the same
> > value.
> >
> > Maybe a Cmake example would suit better since B is set to "${WORKDIR}/build"
> > by default?
> >
> > Otherwise, write a proper Makefile that allows out-of-tree builds for
> > the example :)
> 
>   in the end, i suspect i was overthinking it, thinking somehow there
> was some magic to "externalsrc", only to finally realize it was
> totally inappropriate for source that had to be built in-tree. so i
> just switched over to using SRC_URI and, for various recipes like
> dmidecode, i created a recipe that started with some variation of:
> 
>   LICENSE = "CLOSED"
>   LIC_FILES_CHKSUM = ""
>   FILESEXTRAPATHS_prepend := "${THISDIR}:"
>   SRC_URI := "file://src"

No need for := here, a simple = should suffice?

>   S = "${WORKDIR}/src"
> 

Why not put the sources in:
meta-mylayer/recipes-test/test/my-test-0.1/src/
meta-mylayer/recipes-test/test/my-test_0.1.bb

and have SRC_URI = "file://src/" without needing to add
FILESEXTRAPATHS_prepend := "${THISDIR}:" so that it follows what almost
every recipe does?

S will be as you wrote above.

I thought you were trying to find an example with externalsrc for our
docs, but it seems you have a different thing in mind, can you tell us
so we are able to help you with your actual issue/question :) ?

Cheers,
Quentin

  reply	other threads:[~2021-05-31  8:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 12:51 follow up: keeping the source with an "externalsrc"-based recipe Robert P. J. Day
2021-05-28 13:05 ` [OE-core] " Quentin Schulz
2021-05-28 13:37   ` Robert P. J. Day
2021-05-28 13:57   ` Robert P. J. Day
2021-05-28 14:16     ` Quentin Schulz
2021-05-28 14:47       ` Robert P. J. Day
2021-05-28 15:07         ` Quentin Schulz
2021-05-28 15:15           ` Robert P. J. Day
2021-05-28 15:26             ` Quentin Schulz
2021-05-28 16:14               ` Robert P. J. Day
2021-05-28 21:02               ` Robert P. J. Day
2021-05-31  8:56                 ` Quentin Schulz [this message]
2021-05-31  9:52                   ` Robert P. J. Day
2021-05-31 10:25                   ` Robert P. J. Day

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=20210531085655.tdj73iny3mxhz22a@qschulz \
    --to=quentin.schulz@streamunlimited.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rpjday@crashcourse.ca \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox