* How to set environment variables inside a recipe?
@ 2012-07-19 18:16 Bodke, Kishore K
2012-07-20 10:14 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Bodke, Kishore K @ 2012-07-19 18:16 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
Hi,
I am writing a recipe to build a driver specific for my BSP.
The driver needs a bunch of environmental variables to be set ( specific to driver only ) to build.
Right now to move forward I am doing like below in my recipe to build it.
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
Is this right way to do? Are there any other ways to set the environment variables inside a recipe?
Any suggestions would be helpful.
Thanks
Kishore.
[-- Attachment #2: Type: text/html, Size: 2852 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set environment variables inside a recipe?
2012-07-19 18:16 How to set environment variables inside a recipe? Bodke, Kishore K
@ 2012-07-20 10:14 ` Paul Eggleton
2012-07-20 17:05 ` Bodke, Kishore K
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2012-07-20 10:14 UTC (permalink / raw)
To: Bodke, Kishore K; +Cc: yocto
On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:
> The driver needs a bunch of environmental variables to be set ( specific to
> driver only ) to build.
>
> Right now to move forward I am doing like below in my recipe to build it.
>
> export AAA = "${S}"
> export BBB = "${B}"
> export CCC = "{S}/build-system"
> export DDD = "{S}/env-files"
>
> Is this right way to do? Are there any other ways to set the environment
> variables inside a recipe?
This is valid; I would recommend setting them within the function though (e.g.
do_configure) rather than at the recipe level, assuming that works for your
case.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set environment variables inside a recipe?
2012-07-20 10:14 ` Paul Eggleton
@ 2012-07-20 17:05 ` Bodke, Kishore K
2012-07-20 17:13 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Bodke, Kishore K @ 2012-07-20 17:05 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
>-----Original Message-----
>From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
>Sent: Friday, July 20, 2012 3:14 AM
>To: Bodke, Kishore K
>Cc: yocto@yoctoproject.org
>Subject: Re: [yocto] How to set environment variables inside a recipe?
>
>On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:
>> The driver needs a bunch of environmental variables to be set ( specific to
>> driver only ) to build.
>>
>> Right now to move forward I am doing like below in my recipe to build it.
>>
>> export AAA = "${S}"
>> export BBB = "${B}"
>> export CCC = "{S}/build-system"
>> export DDD = "{S}/env-files"
>>
>> Is this right way to do? Are there any other ways to set the environment
>> variables inside a recipe?
>
>This is valid; I would recommend setting them within the function though (e.g.
>do_configure) rather than at the recipe level, assuming that works for your
>case.
If I set outside the do_configure it builds fine.
But If I do inside
do_confiugre() {
export AAA = "${S}"
export BBB = "${B}"
export CCC = "{S}/build-system"
export DDD = "{S}/env-files"
}
run.do_configure.20832: line 78: export: `=': not a valid identifier
NOTE: task do_configure: Failed
Is the syntax wrong here? What is the correct syntax?
Thanks
Kishore.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set environment variables inside a recipe?
2012-07-20 17:05 ` Bodke, Kishore K
@ 2012-07-20 17:13 ` Robert P. J. Day
2012-07-20 18:14 ` Bodke, Kishore K
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2012-07-20 17:13 UTC (permalink / raw)
To: Bodke, Kishore K; +Cc: Paul Eggleton, yocto@yoctoproject.org
On Fri, 20 Jul 2012, Bodke, Kishore K wrote:
>
>
> >-----Original Message-----
> >From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> >Sent: Friday, July 20, 2012 3:14 AM
> >To: Bodke, Kishore K
> >Cc: yocto@yoctoproject.org
> >Subject: Re: [yocto] How to set environment variables inside a recipe?
> >
> >On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:
> >> The driver needs a bunch of environmental variables to be set ( specific to
> >> driver only ) to build.
> >>
> >> Right now to move forward I am doing like below in my recipe to build it.
> >>
> >> export AAA = "${S}"
> >> export BBB = "${B}"
> >> export CCC = "{S}/build-system"
> >> export DDD = "{S}/env-files"
> >>
> >> Is this right way to do? Are there any other ways to set the environment
> >> variables inside a recipe?
> >
> >This is valid; I would recommend setting them within the function though (e.g.
> >do_configure) rather than at the recipe level, assuming that works for your
> >case.
>
> If I set outside the do_configure it builds fine.
> But If I do inside
> do_confiugre() {
> export AAA = "${S}"
> export BBB = "${B}"
> export CCC = "{S}/build-system"
> export DDD = "{S}/env-files"
> }
>
> run.do_configure.20832: line 78: export: `=': not a valid identifier
> NOTE: task do_configure: Failed
pretty sure you can't have spaces around the "=".
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set environment variables inside a recipe?
2012-07-20 17:13 ` Robert P. J. Day
@ 2012-07-20 18:14 ` Bodke, Kishore K
0 siblings, 0 replies; 5+ messages in thread
From: Bodke, Kishore K @ 2012-07-20 18:14 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Paul Eggleton, yocto@yoctoproject.org
>-----Original Message-----
>From: Robert P. J. Day [mailto:rpjday@crashcourse.ca]
>Sent: Friday, July 20, 2012 10:13 AM
>To: Bodke, Kishore K
>Cc: Paul Eggleton; yocto@yoctoproject.org
>Subject: Re: [yocto] How to set environment variables inside a recipe?
>
>On Fri, 20 Jul 2012, Bodke, Kishore K wrote:
>
>>
>>
>> >-----Original Message-----
>> >From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
>> >Sent: Friday, July 20, 2012 3:14 AM
>> >To: Bodke, Kishore K
>> >Cc: yocto@yoctoproject.org
>> >Subject: Re: [yocto] How to set environment variables inside a recipe?
>> >
>> >On Thursday 19 July 2012 18:16:45 Bodke, Kishore K wrote:
>> >> The driver needs a bunch of environmental variables to be set ( specific
>to
>> >> driver only ) to build.
>> >>
>> >> Right now to move forward I am doing like below in my recipe to build it.
>> >>
>> >> export AAA = "${S}"
>> >> export BBB = "${B}"
>> >> export CCC = "{S}/build-system"
>> >> export DDD = "{S}/env-files"
>> >>
>> >> Is this right way to do? Are there any other ways to set the environment
>> >> variables inside a recipe?
>> >
>> >This is valid; I would recommend setting them within the function though
>(e.g.
>> >do_configure) rather than at the recipe level, assuming that works for your
>> >case.
>>
>> If I set outside the do_configure it builds fine.
>> But If I do inside
>> do_confiugre() {
>> export AAA = "${S}"
>> export BBB = "${B}"
>> export CCC = "{S}/build-system"
>> export DDD = "{S}/env-files"
>> }
>>
>> run.do_configure.20832: line 78: export: `=': not a valid identifier
>> NOTE: task do_configure: Failed
>
> pretty sure you can't have spaces around the "=".
Yes, the spaces was an issue.
Works fine now.
Thanks
Kishore.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-20 18:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 18:16 How to set environment variables inside a recipe? Bodke, Kishore K
2012-07-20 10:14 ` Paul Eggleton
2012-07-20 17:05 ` Bodke, Kishore K
2012-07-20 17:13 ` Robert P. J. Day
2012-07-20 18:14 ` Bodke, Kishore K
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.