Patchwork lz4: actually install things

login
register
mail settings
Submitter Koen Kooi
Date Jan. 23, 2014, 9:06 a.m.
Message ID <1390467988-25693-1-git-send-email-koen.kooi@linaro.org>
Download mbox | patch
Permalink /patch/65589/
State Accepted
Commit bede5a4180be0cbe29c4ee8b7ca53c47e822e4f1
Headers show

Comments

Koen Kooi - Jan. 23, 2014, 9:06 a.m.
This failure was masked by having lz4 installed on the host system :(

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
 meta/recipes-support/lz4/lz4_svn.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Otavio Salvador - Jan. 23, 2014, 11:31 a.m.
On Thu, Jan 23, 2014 at 7:06 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
> This failure was masked by having lz4 installed on the host system :(
>
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>

Couldn't it inherit autotools?
Koen Kooi - Jan. 23, 2014, 11:35 a.m.
Op 23 jan. 2014, om 12:31 heeft Otavio Salvador <otavio@ossystems.com.br> het volgende geschreven:

> On Thu, Jan 23, 2014 at 7:06 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
>> This failure was masked by having lz4 installed on the host system :(
>> 
>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> 
> Couldn't it inherit autotools?

It's a handcrafted Makefile, not autotools :(

regards,

Koen
Otavio Salvador - Jan. 23, 2014, 11:36 a.m.
On Thu, Jan 23, 2014 at 9:35 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>
> Op 23 jan. 2014, om 12:31 heeft Otavio Salvador <otavio@ossystems.com.br> het volgende geschreven:
>
>> On Thu, Jan 23, 2014 at 7:06 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
>>> This failure was masked by having lz4 installed on the host system :(
>>>
>>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
>>
>> Couldn't it inherit autotools?
>
> It's a handcrafted Makefile, not autotools :(

No problem, it works as well.

The do_configure checks for configure.ac/configure.in and it avoid you
to handcraft do_install and like.
Koen Kooi - Jan. 23, 2014, 11:40 a.m.
Op 23 jan. 2014, om 12:36 heeft Otavio Salvador <otavio@ossystems.com.br> het volgende geschreven:

> On Thu, Jan 23, 2014 at 9:35 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
>> 
>> Op 23 jan. 2014, om 12:31 heeft Otavio Salvador <otavio@ossystems.com.br> het volgende geschreven:
>> 
>>> On Thu, Jan 23, 2014 at 7:06 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
>>>> This failure was masked by having lz4 installed on the host system :(
>>>> 
>>>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
>>> 
>>> Couldn't it inherit autotools?
>> 
>> It's a handcrafted Makefile, not autotools :(
> 
> No problem, it works as well.
> 
> The do_configure checks for configure.ac/configure.in and it avoid you
> to handcraft do_install and like.

The recipes that used such a workaround have all been changed to remote autotools.bbclass over the years, so I'm not sure how encouraged it is.

regards,

Koen
Paul Eggleton - Jan. 23, 2014, 11:46 a.m.
On Thursday 23 January 2014 09:36:09 Otavio Salvador wrote:
> On Thu, Jan 23, 2014 at 9:35 AM, Koen Kooi <koen@dominion.thruhere.net>
> wrote:
> > Op 23 jan. 2014, om 12:31 heeft Otavio Salvador <otavio@ossystems.com.br>
> het volgende geschreven:
> >> On Thu, Jan 23, 2014 at 7:06 AM, Koen Kooi <koen.kooi@linaro.org> wrote:
> >>> This failure was masked by having lz4 installed on the host system :(
> >>> 
> >>> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> >> 
> >> Couldn't it inherit autotools?
> > 
> > It's a handcrafted Makefile, not autotools :(
> 
> No problem, it works as well.
> 
> The do_configure checks for configure.ac/configure.in and it avoid you
> to handcraft do_install and like.

Do _not_ inherit autotools if the software being built doesn't use 
autoconf/automake. Whilst it may work now in some situations, there's 
absolutely no guarantee it won't break in the future. autotools.bbclass needs 
to be able to assume it's actually being used with autotools.

Cheers,
Paul
Ross Burton - Jan. 23, 2014, 11:47 a.m.
On 23 January 2014 11:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>>> Couldn't it inherit autotools?
>>>
>>> It's a handcrafted Makefile, not autotools :(
>>
>> No problem, it works as well.
>>
>> The do_configure checks for configure.ac/configure.in and it avoid you
>> to handcraft do_install and like.
>
> The recipes that used such a workaround have all been changed to remote autotools.bbclass over the years, so I'm not sure how encouraged it is.


Personally a recipe should only inherit autotools if it actually uses
autotools.  Hand crafted makefiles should mean hand-crafted recipes.

Ross
Otavio Salvador - Jan. 23, 2014, 11:49 a.m.
On Thu, Jan 23, 2014 at 9:47 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 23 January 2014 11:40, Koen Kooi <koen@dominion.thruhere.net> wrote:
>>>>> Couldn't it inherit autotools?
>>>>
>>>> It's a handcrafted Makefile, not autotools :(
>>>
>>> No problem, it works as well.
>>>
>>> The do_configure checks for configure.ac/configure.in and it avoid you
>>> to handcraft do_install and like.
>>
>> The recipes that used such a workaround have all been changed to remote autotools.bbclass over the years, so I'm not sure how encouraged it is.
>
>
> Personally a recipe should only inherit autotools if it actually uses
> autotools.  Hand crafted makefiles should mean hand-crafted recipes.

I will respect your opinions but I see no reason to not use autoconf
if do_configure checks for it.
Ross Burton - Jan. 23, 2014, 11:53 a.m.
On 23 January 2014 11:49, Otavio Salvador <otavio@ossystems.com.br> wrote:
>> Personally a recipe should only inherit autotools if it actually uses
>> autotools.  Hand crafted makefiles should mean hand-crafted recipes.
>
> I will respect your opinions but I see no reason to not use autoconf
> if do_configure checks for it.

Extra build dependencies, extra logic beyond what is needed, the need
to be careful in the future when we can't assume that
autotools.bbclass is used with autotools-using recipes.

Ross
Otavio Salvador - Jan. 23, 2014, 12:01 p.m.
On Thu, Jan 23, 2014 at 9:53 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 23 January 2014 11:49, Otavio Salvador <otavio@ossystems.com.br> wrote:
>>> Personally a recipe should only inherit autotools if it actually uses
>>> autotools.  Hand crafted makefiles should mean hand-crafted recipes.
>>
>> I will respect your opinions but I see no reason to not use autoconf
>> if do_configure checks for it.
>
> Extra build dependencies, extra logic beyond what is needed, the need
> to be careful in the future when we can't assume that
> autotools.bbclass is used with autotools-using recipes.

Ok; you won.

heheh

Patch

diff --git a/meta/recipes-support/lz4/lz4_svn.bb b/meta/recipes-support/lz4/lz4_svn.bb
index 41464e2..a760313 100644
--- a/meta/recipes-support/lz4/lz4_svn.bb
+++ b/meta/recipes-support/lz4/lz4_svn.bb
@@ -12,6 +12,10 @@  SRC_URI = "svn://lz4.googlecode.com/svn/;module=trunk;protocol=http"
 
 S = "${WORKDIR}/trunk"
 
-EXTRA_OEMAKE = "PREFIX=${prefix} CC=${TARGET_PREFIX}gcc DESTDIR=${D}"
+EXTRA_OEMAKE = "PREFIX=${prefix} CC=${TARGET_PREFIX}gcc DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
+
+do_install() {
+	oe_runmake install
+}
 
 BBCLASSEXTEND += "native nativesdk"