Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ulf Samuelsson <openembedded-core@emagii.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: Whitespace not allowed in COMPATIBLE_MACHINE
Date: Tue, 29 Nov 2011 15:09:23 +0100	[thread overview]
Message-ID: <4ED4E793.2080605@emagii.com> (raw)
In-Reply-To: <1322564887.26081.131.camel@phil-desktop>

On 2011-11-29 12:08, Phil Blundell wrote:
> On Tue, 2011-11-29 at 11:12 +0100, Ulf Samuelsson wrote:
>> Have had a lot of problems trying to get a recipe running.
>> I finally discovered that "COMPATIBLE_MACHINE" is sensitive to whitespace.
>> This is a real PITA expecially since COMPATIBLE_MACHINE is yet to be
>> documented in the manual
> Indeed, it's a regular expression.  This is mentioned in
> documentation.conf:
>
> COMPATIBLE_MACHINE[doc] = "A regular expression which matches the
> MACHINES support by the package/file. Failure to match will cause the
> file to be skipped by the parser."
>
> If you think the description can be improved then I'm sure patches would
> be welcome.

Its pretty clear, but this assumes that you are aware of the file itself.
Have just started looking into openembedded-core, so I didnt even know 
the file existed.
Is this file mentioned anywhere?

I was looking at the openembedded "manual" in the home page
where COMPATIBLE_MACHINE is mentioned, but not much else.

Is there a reason to use a regular expression?
Why not a list of compatible machines?

Obviously you can have
COMPATIBLE_MACHINE = "at91*"
but if you need to list machines, and you have plenty of them
you have one very long line...

>> Working:
>> COMPATIBLE_MACHINE = "machine1"
>> COMPATIBLE_MACHINE = "machine1|machine2"
>> COMPATIBLE_MACHINE = "(machine1)"
>> COMPATIBLE_MACHINE = "(machine1|machine2)"
>>
>> COMPATIBLE_MACHINE = "machine1"
>> COMPATIBLE_MACHINE += "|machine2"
> I'm slightly surprised that this last example would work.  It ought to
> be equivalent to...
>

It seems to work for me.

I have in my U-Boot recipe:
COMPATIBLE_MACHINE     = 
"at91sam9260ek|at91sam9xeek|at91sam9g20ek|at91sam9g20ek_2mmc"
COMPATIBLE_MACHINE    += "|at91sam9261ek|at91sam9g10ek"
COMPATIBLE_MACHINE    += "|at91sam9263ek"
COMPATIBLE_MACHINE    += 
"|at91sam9g45ek|at91sam9g45ekes|at91sam9m10ekes|at91sam9m10g45ek"
COMPATIBLE_MACHINE    += 
"|at91sam9g15ek|at91sam9g25ek|at91sam9g35ek|at91sam9x25ek|at91sam9x35ek"
COMPATIBLE_MACHINE    += "|at91sam9rlek"

MACHINE =  "at91sam9g35ek"
If I add a space in the COMPATIBLE_MACHINE definition somewhere,
then the recipe is not used.

Hmm, I just realized why it will work.
If I try to build for "at91sam9263ek" then the regexp becomes 
"at91sam963ek " (with a space),
so it will only work for machines which are not at the end of a line...

If I want to split into several lines, then I guess an ugly hack would be.
COMPATIBLE_MACHINE     = 
"at91sam9260ek|at91sam9xeek|at91sam9g20ek|at91sam9g20ek_2mmc|            
                XX1"
COMPATIBLE_MACHINE    += "|at91sam9261ek|at91sam9g10ek|                
                                                                         
XX2"
COMPATIBLE_MACHINE    += "|at91sam9263ek|                               
                                                                        
              XX3"
COMPATIBLE_MACHINE    += 
"|at91sam9g45ek|at91sam9g45ekes|at91sam9m10ekes|at91sam9m10g45ek|       
             XX4"
COMPATIBLE_MACHINE    += 
"|at91sam9g15ek|at91sam9g25ek|at91sam9g35ek|at91sam9x25ek|at91sam9x35ek|    
     XX5"
COMPATIBLE_MACHINE    += "|at91sam9rlek"

BR
Ulf Samuelsson

>> COMPATIBLE_MACHINE = "machine1 |machine2"
> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


-- 
Best Regards
Ulf Samuelsson
eMagii




  reply	other threads:[~2011-11-29 14:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 10:12 Whitespace not allowed in COMPATIBLE_MACHINE Ulf Samuelsson
2011-11-29 11:08 ` Phil Blundell
2011-11-29 14:09   ` Ulf Samuelsson [this message]
2011-11-29 14:47     ` Chris Larson
2011-11-29 15:23     ` Phil Blundell

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=4ED4E793.2080605@emagii.com \
    --to=openembedded-core@emagii.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ulf@emagii.com \
    /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