In the embedded book, the BUILD variable gets set in section 6.3 but
doesn't get stored into the clfs user's .bashrc until section 7.3.  If
the clfs user logs out between these two sections, the next time they
log in the BUILD variable won't be set and this could cause issues.

Attached a patch to store the BUILD variable into .bashrc right after
it's first set, in section 6.3.
I also cleaned up the formatting in the xml for BOOK/cross-tools/x86/abi.xml.

I had added a comment to trac ticket (#620) but it doesn't really add
to that discussion of if the BUILD variable is really needed.  This
more cleans up the existing instructions.

Regards,
Andrew
From 70b934146da085a59d1dc4b2135595e3b99378ef Mon Sep 17 00:00:00 2001
From: Andrew Bradford <[email protected]>
Date: Mon, 24 Jan 2011 19:25:00 -0500
Subject: [PATCH] Move BUILD storage into .bashrc from 7.3 to 6.3

BUILD gets defined in section 6.3 but doesn't get stored into clfs
user's .bashrc until section 7.3.  If the clfs user logs out between
these two, the BUILD variable won't be kept.
This fixes that.  Now BUILD gets stored in .bashrc right after it
gets defined the first time.
---
 BOOK/cross-tools/x86/abi.xml           |    9 +++++----
 BOOK/final-system/common/toolchain.xml |    1 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/BOOK/cross-tools/x86/abi.xml b/BOOK/cross-tools/x86/abi.xml
index 9171401..c8aa438 100644
--- a/BOOK/cross-tools/x86/abi.xml
+++ b/BOOK/cross-tools/x86/abi.xml
@@ -12,11 +12,12 @@
 
   <para os="a" >Setup for a Particular ABI:</para>
 
-<screen os="b"><userinput>export BUILD="<replaceable>[From Chart]</replaceable>"</userinput></screen>
+<screen os="b"><userinput>export BUILD="<replaceable>[From Chart]</replaceable>"
+echo export BUILD=\""${BUILD}\"" &gt;&gt; ~/.bashrc</userinput></screen>
 
-  <para os="c">The following table gives the entires for the different ABI's that CLFS Embedded supports. Make
-  sure you select one for your build, this will ensure capatibilty of your build with your target
-  architecture.</para>
+  <para os="c">The following table gives the entires for the different ABI's 
+  that CLFS Embedded supports. Make sure you select one for your build, this
+  will ensure capatibilty of your build with your target architecture.</para>
 
   <table>
     <title>List of Build Variables</title>
diff --git a/BOOK/final-system/common/toolchain.xml b/BOOK/final-system/common/toolchain.xml
index 10824b5..bd98da4 100644
--- a/BOOK/final-system/common/toolchain.xml
+++ b/BOOK/final-system/common/toolchain.xml
@@ -21,7 +21,6 @@ echo <literal>export LD=\""${CLFS_TARGET}-ld\""</literal> &gt;&gt; ~/.bashrc
 echo <literal>export RANLIB=\""${CLFS_TARGET}-ranlib\""</literal> &gt;&gt; ~/.bashrc
 echo <literal>export READELF=\""${CLFS_TARGET}-readelf\""</literal> &gt;&gt; ~/.bashrc
 echo <literal>export STRIP=\""${CLFS_TARGET}-strip\""</literal> &gt;&gt; ~/.bashrc
-echo <literal>export BUILD=\""${BUILD}\""</literal> &gt;&gt; ~/.bashrc
 source ~/.bashrc</userinput></screen>
 
 </sect1>
-- 
1.5.6.5

_______________________________________________
Clfs-dev mailing list
[email protected]
http://lists.cross-lfs.org/listinfo.cgi/clfs-dev-cross-lfs.org

Reply via email to