From d65774fd04c0287c531df4bf0177d4407ce17fd1 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 23 Feb 2003 17:04:57 +0000 Subject: [PATCH] Better handling of pass_toolset [SVN r17604] --- test/BoostBuild.py | 19 ++++++++++++------- v2/test/BoostBuild.py | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/test/BoostBuild.py b/test/BoostBuild.py index e6242223b..deef51baa 100644 --- a/test/BoostBuild.py +++ b/test/BoostBuild.py @@ -19,15 +19,18 @@ def get_toolset(): return toolset or 'gcc' windows = 0 +suffixes = {} # Prepare the map of suffixes -suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'} -if os.environ.get('OS','').lower().startswith('windows'): - windows = 1 - suffixes = {} - if get_toolset() in ["gcc"]: - suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw... - suffixes['.obj'] = '.o' +def prepare_suffix_map(toolset): + suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'} + if os.environ.get('OS','').lower().startswith('windows'): + global windows, suffixes + windows = 1 + suffixes = {} + if toolset in ["gcc"]: + suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw... + suffixes['.obj'] = '.o' @@ -74,6 +77,8 @@ class Tester(TestCmd.TestCmd): if pass_toolset: arguments = self.toolset + " " + arguments + prepare_suffix_map(pass_toolset and 'gcc' or self.toolset) + jam_build_dir = "" if os.name == 'nt': jam_build_dir = "bin.ntx86" diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index e6242223b..deef51baa 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -19,15 +19,18 @@ def get_toolset(): return toolset or 'gcc' windows = 0 +suffixes = {} # Prepare the map of suffixes -suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'} -if os.environ.get('OS','').lower().startswith('windows'): - windows = 1 - suffixes = {} - if get_toolset() in ["gcc"]: - suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw... - suffixes['.obj'] = '.o' +def prepare_suffix_map(toolset): + suffixes = {'.exe': '', '.dll': '.so', '.lib': '.a', '.obj': '.o'} + if os.environ.get('OS','').lower().startswith('windows'): + global windows, suffixes + windows = 1 + suffixes = {} + if toolset in ["gcc"]: + suffixes['.lib'] = '.a' # static libs have '.a' suffix with mingw... + suffixes['.obj'] = '.o' @@ -74,6 +77,8 @@ class Tester(TestCmd.TestCmd): if pass_toolset: arguments = self.toolset + " " + arguments + prepare_suffix_map(pass_toolset and 'gcc' or self.toolset) + jam_build_dir = "" if os.name == 'nt': jam_build_dir = "bin.ntx86"