From ad4cb45ea4d126b7fd2069e84f44a459827e39b1 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 30 Oct 2006 08:36:14 +0000 Subject: [PATCH] Merge: Unbreak multi-element gcc commands [SVN r35792] --- v2/tools/gcc.jam | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index d767436d6..1870e6827 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -75,8 +75,11 @@ rule init ( version ? : command * : options * ) # Autodetect the version and flavor if not given. if $(command) { + # The 'command' variable can have multiple-element. When calling + # the SHELL builtin we need a single string. + local command-string = $(command:J=" ") ; local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)" - : [ SHELL "$(command) --version" ] ] ; + : [ SHELL "$(command-string) --version" ] ] ; version ?= $(command-info[1]) ; switch $(command-info[2]:L) {