* recipe simplification questions
@ 2010-09-08 17:41 Frans Meulenbroeks
2010-09-08 17:49 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2010-09-08 17:41 UTC (permalink / raw)
To: openembedded-devel
Hi
While browsing through a recipe I stumbled upon the following two functions:
inherit autotools
do_configure() {
oe_runconf
}
do_install() {
make install DESTDIR=${D}
}
Two questions:
1) does a do_configure like above have any use?
I would expect it to be the default case in case of autotools
2) the make install line I have seen on several places.
Isn't it more elegant/simpler to just say
EXTRA_OEMAKE = "DESTDIR=${D}" and remove the whole do_install function?
Frans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: recipe simplification questions
2010-09-08 17:41 recipe simplification questions Frans Meulenbroeks
@ 2010-09-08 17:49 ` Khem Raj
2010-09-08 18:40 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2010-09-08 17:49 UTC (permalink / raw)
To: openembedded-devel
On Wed, Sep 8, 2010 at 10:41 AM, Frans Meulenbroeks
<fransmeulenbroeks@gmail.com> wrote:
> Hi
>
> While browsing through a recipe I stumbled upon the following two functions:
>
> inherit autotools
>
> do_configure() {
> oe_runconf
> }
if you look into autotools bbclass then you will see that do_configure
does much more it regenerates the configure scripts before it runs
sometimes thats not a viable option we just want to use whatever
configure is provided in tar and that is what this does.
>
> do_install() {
> make install DESTDIR=${D}
> }
>
this if used in a recipe which inherits autotools could be for getting
parallelism out of context during install but not during compile.
again this kind of stuff should be avoided.
> Two questions:
>
> 1) does a do_configure like above have any use?
> I would expect it to be the default case in case of autotools
>
> 2) the make install line I have seen on several places.
> Isn't it more elegant/simpler to just say
> EXTRA_OEMAKE = "DESTDIR=${D}" and remove the whole do_install function?
>
> Frans
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: recipe simplification questions
2010-09-08 17:49 ` Khem Raj
@ 2010-09-08 18:40 ` Tom Rini
2010-09-08 18:48 ` Frans Meulenbroeks
0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2010-09-08 18:40 UTC (permalink / raw)
To: openembedded-devel
Khem Raj wrote:
> On Wed, Sep 8, 2010 at 10:41 AM, Frans Meulenbroeks
> <fransmeulenbroeks@gmail.com> wrote:
>> Hi
>>
>> While browsing through a recipe I stumbled upon the following two functions:
[snip]
>> do_install() {
>> make install DESTDIR=${D}
>> }
>>
>
> this if used in a recipe which inherits autotools could be for getting
> parallelism out of context during install but not during compile.
> again this kind of stuff should be avoided.
Not true (but I had to double check just now, so it's quite possible
some others have assumed this behavior). If we look at bitbake.conf:
EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
So in the case of literally having DESTDIR=${D}, these can just go away.
There are some annoying cases however where it's not DESTDIR but some
other variable. IMHO, it's questionable if it'd be cleaner to do a
custom one line do_install vs EXTRA_OEMAKE_append_task-do_install =
"PREFIX=${D}"
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: recipe simplification questions
2010-09-08 18:40 ` Tom Rini
@ 2010-09-08 18:48 ` Frans Meulenbroeks
2010-09-08 19:08 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2010-09-08 18:48 UTC (permalink / raw)
To: openembedded-devel
2010/9/8 Tom Rini <tom_rini@mentor.com>:
> Khem Raj wrote:
>>
>> On Wed, Sep 8, 2010 at 10:41 AM, Frans Meulenbroeks
>> <fransmeulenbroeks@gmail.com> wrote:
>>>
>>> Hi
>>>
>>> While browsing through a recipe I stumbled upon the following two
>>> functions:
>
> [snip]
>>>
>>> do_install() {
>>> make install DESTDIR=${D}
>>> }
>>>
>>
>> this if used in a recipe which inherits autotools could be for getting
>> parallelism out of context during install but not during compile.
>> again this kind of stuff should be avoided.
>
> Not true (but I had to double check just now, so it's quite possible some
> others have assumed this behavior). If we look at bitbake.conf:
> EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
> EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
>
> So in the case of literally having DESTDIR=${D}, these can just go away.
> There are some annoying cases however where it's not DESTDIR but some other
> variable. IMHO, it's questionable if it'd be cleaner to do a custom one
> line do_install vs EXTRA_OEMAKE_append_task-do_install = "PREFIX=${D}"
Woudht aht have to be an EXTRA_OEMAKE_append_task-do_install ?
I see also recipes that just add PREFIX or DESTDIR to EXTRA_OEMAKE
(actually I would expect the presence or absence not to be an issue in
most cases (as DESTDIR is quite likely not used during compile)
Frans
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: recipe simplification questions
2010-09-08 18:48 ` Frans Meulenbroeks
@ 2010-09-08 19:08 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2010-09-08 19:08 UTC (permalink / raw)
To: openembedded-devel
Frans Meulenbroeks wrote:
> 2010/9/8 Tom Rini <tom_rini@mentor.com>:
>> Khem Raj wrote:
>>> On Wed, Sep 8, 2010 at 10:41 AM, Frans Meulenbroeks
>>> <fransmeulenbroeks@gmail.com> wrote:
>>>> Hi
>>>>
>>>> While browsing through a recipe I stumbled upon the following two
>>>> functions:
>> [snip]
>>>> do_install() {
>>>> make install DESTDIR=${D}
>>>> }
>>>>
>>> this if used in a recipe which inherits autotools could be for getting
>>> parallelism out of context during install but not during compile.
>>> again this kind of stuff should be avoided.
>> Not true (but I had to double check just now, so it's quite possible some
>> others have assumed this behavior). If we look at bitbake.conf:
>> EXTRA_OEMAKE_prepend_task_do_compile = "${PARALLEL_MAKE} "
>> EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
>>
>> So in the case of literally having DESTDIR=${D}, these can just go away.
>> There are some annoying cases however where it's not DESTDIR but some other
>> variable. IMHO, it's questionable if it'd be cleaner to do a custom one
>> line do_install vs EXTRA_OEMAKE_append_task-do_install = "PREFIX=${D}"
>
> Woudht aht have to be an EXTRA_OEMAKE_append_task-do_install ?
> I see also recipes that just add PREFIX or DESTDIR to EXTRA_OEMAKE
> (actually I would expect the presence or absence not to be an issue in
> most cases (as DESTDIR is quite likely not used during compile)
Yes, it could also probably live in just plain old EXTRA_OEMAKE.
Another task for the janitors page I suppose :)
--
Tom Rini
Mentor Graphics Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-09-08 19:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 17:41 recipe simplification questions Frans Meulenbroeks
2010-09-08 17:49 ` Khem Raj
2010-09-08 18:40 ` Tom Rini
2010-09-08 18:48 ` Frans Meulenbroeks
2010-09-08 19:08 ` Tom Rini
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.