From: Denys Dmytriyenko <denis@denix.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [SDK] meta-toolchain.bb generates very interesting environment-setup
Date: Thu, 25 Mar 2010 14:01:15 -0400 [thread overview]
Message-ID: <20100325180115.GD28005@denix.org> (raw)
In-Reply-To: <48239d391003250816m3686a994h92fd5a115c3f47d4@mail.gmail.com>
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?
> diff --git a/recipes/meta/meta-toolchain.bb b/recipes/meta/meta-toolchain.bb
> index 688995c..4f7ffda 100644
> --- a/recipes/meta/meta-toolchain.bb
> +++ b/recipes/meta/meta-toolchain.bb
> @@ -145,8 +145,8 @@ do_populate_sdk() {
> 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-sd
> - echo "alias opkg-target='LD_LIBRARY_PATH=$SDK_PATH/lib
> $SDK_PATH/bin/opkg-cl -f $SDK_PATH/$TARGET_SYS${s
> + echo "alias opkg='LD_LIBRARY_PATH=\$SDK_PATH/lib
> \$SDK_PATH/bin/opkg-cl -f \$SDK_PATH/${sysconfdir}/opkg
> + echo "alias opkg-target='LD_LIBRARY_PATH=\$SDK_PATH/lib
> \$SDK_PATH/bin/opkg-cl -f \$SDK_PATH/$TARGET_SYS
>
> # Add version information
> versionfile=${SDK_OUTPUT}/${SDKPATH}/version
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
next prev parent reply other threads:[~2010-03-25 18:05 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 [this message]
2010-03-25 18:33 ` Tom Rini
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=20100325180115.GD28005@denix.org \
--to=denis@denix.org \
--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.