All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <tom_rini@mentor.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [SDK] meta-toolchain.bb generates very interesting environment-setup
Date: Thu, 25 Mar 2010 11:33:21 -0700	[thread overview]
Message-ID: <1269542001.3545.56.camel@trini-m4400> (raw)
In-Reply-To: <20100325180115.GD28005@denix.org>

On Thu, 2010-03-25 at 14:01 -0400, Denys Dmytriyenko wrote:
> On Thu, Mar 25, 2010 at 06:16:49PM +0300, Sergey Lapin wrote:
> > $ cat /usr/local/angstrom/arm/environment-setup
> > export SDK_PATH=/usr/local/angstrom/arm
> > export TARGET_SYS=arm-angstrom-linux-gnueabi
> > export PATH=$SDK_PATH/bin:$PATH
> > export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH
> > export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS
> > export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS
> > export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS/usr/lib/pkgconfig
> > export CONFIG_SITE=$SDK_PATH/site-config
> > alias opkg='LD_LIBRARY_PATH=/lib /bin/opkg-cl -f //etc/opkg-sdk.conf -o '
> > alias opkg-target='LD_LIBRARY_PATH=/lib /bin/opkg-cl -f //etc/opkg.conf -o /'
> > 
> > A problem seems to be this code:
> > 
> > # Create environment setup script
> >         script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
> >         touch $script
> >         echo 'export SDK_PATH=${SDKPATH}' >> $script
> >         echo 'export TARGET_SYS=${TARGET_SYS}' >> $script
> >         echo 'export PATH=$SDK_PATH/bin:$PATH' >> $script
> >         echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
> >         echo 'export LIBTOOL_SYSROOT_PATH=$SDK_PATH/$TARGET_SYS' >> $script
> >         echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
> >         echo 'export
> > PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
> >         echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
> >         echo "alias opkg='LD_LIBRARY_PATH=$SDK_PATH/lib
> > $SDK_PATH/bin/opkg-cl -f $SDK_PATH/${sysconfdir}/opkg-s
> > dk.conf -o $SDK_PATH'" >> $script
> >         echo "alias opkg-target='LD_LIBRARY_PATH=$SDK_PATH/lib
> > $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${
> > sysconfdir}/opkg.conf -o $SDK_PATH/$TARGET_SYS'" >> $script
> > 
> > 
> > it seems that $SDK_PATH in last two lines gets resolved instead of
> > being written literally. adding \ before $ in these lines seems to fix
> > this problem. Is it appropriate fix?
> 
> Ah, interesting... It worked for me when the last two lines had double quotes 
> inside single quotes. But to match RP's styling, I had to revert that to 
> single quotes inside double quotes and it doesn't seem to work:
> 
> $ echo 'show "$SDK_PATH"'
> show "$SDK_PATH"
> 
> $ echo "show '$SDK_PATH'"
> show ''
> 
> I wonder if it would be Ok to revert back to the original quoting... Or is 
> escaping with \ a better fix?

Ordered quoting ('""') is how we handle this in other recipes, so we
should do it here.

-- 
Tom Rini <tom_rini@mentor.com>
Mentor Graphics Corporation



      reply	other threads:[~2010-03-25 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 15:16 [SDK] meta-toolchain.bb generates very interesting environment-setup Sergey Lapin
2010-03-25 18:01 ` Denys Dmytriyenko
2010-03-25 18:33   ` Tom Rini [this message]

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=1269542001.3545.56.camel@trini-m4400 \
    --to=tom_rini@mentor.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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 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.