2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

Change to using the stable "-dumpversion" and "-dumpmachine" options of GCC to autoconfigure the toolset.

[SVN r37573]
This commit is contained in:
Rene Rivera
2007-05-03 06:05:21 +00:00
parent 609770ebf0
commit ac1109b9ee

View File

@@ -81,10 +81,11 @@ rule init ( version ? : command * : options * )
# The 'command' variable can have multiple elements. When calling
# the SHELL builtin we need a single string.
local command-string = $(command:J=" ") ;
local command-info = [ MATCH "^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)[^(]*[(]?([^)]*)"
: [ SHELL "$(command-string) --version" ] ] ;
version ?= $(command-info[1]) ;
switch $(command-info[2]:L)
local machine = [ MATCH "^([^ ]+)"
: [ SHELL "$(command-string) -dumpmachine" ] ] ;
version ?= [ MATCH "^([0-9.]+)"
: [ SHELL "$(command-string) -dumpversion" ] ] ;
switch $(machine:L)
{
case *mingw* : flavor ?= mingw ;
}