Lawrence,<br><br>You don&#39;t say what build tools you are using, but if you are using make, and you have a separate top-level Makefile for each architecture, with recursive make calls in lower directories, you can put your environmental variables in that top-level Makefile.  They then override the environmental variables in the shell.<br>
<br>You can use include files, one for each architecture, to change the environmental variables, too.<br><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Message: 1<br>
Date: Mon, 23 Nov 2009 15:11:53 -0500<br>
From: &quot;Weber, Lawrence A&quot; &lt;<a href="mailto:Lawrence.Weber@ansaldo-sts.us">Lawrence.Weber@ansaldo-sts.us</a>&gt;<br>
Subject: [wplug] Managing Environment Variables<br>
To: &lt;<a href="mailto:wplug@wplug.org">wplug@wplug.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:3D7A5969DC27E747A85F69D1AFF864950B089A98@exchptc2.uss.switch.com">3D7A5969DC27E747A85F69D1AFF864950B089A98@exchptc2.uss.switch.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
<br>
I am maintaining multiple directory trees containing the Linux source<br>
plus applications programs for several embedded projects.  The projects<br>
use a common set of build tools.  There are several environment<br>
variables that must be set to provide configuration and makefiles with<br>
the location of the source code, install directories, etc.  If I set<br>
these environment variables for one project in .bashrc then only that<br>
project builds correctly.<br>
<br>
I am looking for ideas for redefining the default variables in .bashrc,<br>
so I can build a different project.<br>
<br>
I tried sourcing (.) bash scripts that export new values but found that<br>
did not work.  It appears as if some sub shells created during the build<br>
are grabbing the environment variables&#39; value that .bashrc set when the<br>
terminal shell opened.<br>
<br>
Creating unique environment variables for each project is not realistic.<br>
<br>
Currently I have to edit .bashrc, close the terminal, then reopen the<br>
terminal.  Also not a great way.<br>
<br>
- laweber<br><br>
</blockquote></div><br>-- <br>Mike Sussman<br>