On 08/01/2016 14:13, Read, James C wrote:
I do not think so: you either need to put all on one line, eg (the
mailer might truncate the line):
CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib 
../binutils-2.25.1/configure --prefix=/tools --disable-nls --disable-werror 
--with-lib-path=/tools/lib --with-sysroot
or use the continuation character \ as in the book.
Interesting, and yet the $LFS_TGT seems to be visible. What's the difference?


If you run, say:
---
CC=$LFS_TGT-gcc
---
The variable CC is only set for the current shel, not for programs run from the shell. If you want the variable CC to be passed to programs run from the shell, you have to export it.
For example:
-----
HELLO=hello
echo $HELLO # displays "hello"
bash # run a subshell
echo $HELLO # displays a blank line
exit # back to the parent shell
export HELLO
bash # run a subshell
echo $HELLO # displays "hello"
exit # back to the parent shell
-----
Now, if you want to export a variable only for one command, you type it before the command on the same line:
For example:
-----
unset HELLO
echo $HELLO # displays a blank line
HELLO=hello bash # run a subshell with HELLO set in the environment
echo $HELLO # displays "hello"
exit # back to the parent shell
echo $HELLO # displays a blank line
----
Hope it is clear.
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to