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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152460): 
https://lists.openembedded.org/g/openembedded-core/message/152460
Mute This Topic: https://lists.openembedded.org/mt/83147632/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to