>-----Original Message----- >From: Robert P. J. Day [mailto:rpj...@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.eggle...@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. _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto