$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60768 - trunk/tools/jam/src
From: grafikrobot_at_[hidden]
Date: 2010-03-22 11:26:45
Author: grafik
Date: 2010-03-22 11:26:45 EDT (Mon, 22 Mar 2010)
New Revision: 60768
URL: http://svn.boost.org/trac/boost/changeset/60768
Log:
Fix possible problems when trailing or leading whitespace is added to the env vars used, for example CC and CFLAGS when using the cc toolset. Even though I can't get compilation to fail even with the extra whitespace during building it does seem to fail for some compilers that don't ignore the whitespace arguments. (Fixes #3630)
Text files modified: 
   trunk/tools/jam/src/build.jam |    14 ++++++++++++++                          
   1 files changed, 14 insertions(+), 0 deletions(-)
Modified: trunk/tools/jam/src/build.jam
==============================================================================
--- trunk/tools/jam/src/build.jam	(original)
+++ trunk/tools/jam/src/build.jam	2010-03-22 11:26:45 EDT (Mon, 22 Mar 2010)
@@ -2,6 +2,20 @@
 #~ Distributed under the Boost Software License, Version 1.0.
 #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
+# Clean env vars of any "extra" empty values.
+for local v in ARGV CC CFLAGS
+{
+	local values ;
+	for local x in $($(v))
+	{
+		if $(x) != ""
+		{
+			values += $(x) ;
+		}
+	}
+	$(v) = $(values) ;
+}
+
 # Platform related specifics.
 if $(NT) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }
 else if $(OS2) { rule .path { return "$(<:J=\\)" ; } ./ = "/" ; }