Fix for color-gcc when used from within scons.
What happens is that when you use color-gcc from within scons, somehow,
the environment variable $HOME doesn't get copied into the child process'
list of environment variables. Because of this, perl complains of trying
to concatenate an uninitialized variable, and spits out the following
error:
Use of uninitialized value in concatenation (.) or string at
/usr/local/bin/g++ line 183.
This can be fixed by copying the following lines of code just before the
offending line 183 in the perl script /usr/local/bin/g++. The offending
line 183 should mostly be something like:
$configFile = $ENV{"HOME"} . "/.colorgccrc";
And here is the fix:
my($found_HOME) = 0;
while (my ($key, $value) = each (%ENV))
{
if ($key =~ /HOME/)
{
$found_HOME = 1;
last;
}
}
if ($found_HOME == 0)
{
$ENV{"HOME"} = "/";
}