From: cournape Date: Thu, 19 Nov 2009 04:56:16 +0000 (+0000) Subject: ENH: use msvc env, not msvs to set up mslib and mslink paths. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c6f96c6edbd82c104e77451c8edf7cdf90eba03e;p=scons.git ENH: use msvc env, not msvs to set up mslib and mslink paths. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4440 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Tool/MSCommon/__init__.py b/src/engine/SCons/Tool/MSCommon/__init__.py index c883287d..fe4a7c6a 100644 --- a/src/engine/SCons/Tool/MSCommon/__init__.py +++ b/src/engine/SCons/Tool/MSCommon/__init__.py @@ -40,7 +40,8 @@ from SCons.Tool.MSCommon.sdk import mssdk_exists, \ mssdk_setup_env from SCons.Tool.MSCommon.vc import msvc_exists, \ - msvc_setup_env + msvc_setup_env, \ + msvc_setup_env_once from SCons.Tool.MSCommon.vs import get_default_version, \ get_vs_by_version, \ diff --git a/src/engine/SCons/Tool/mslib.py b/src/engine/SCons/Tool/mslib.py index 9d0fcef0..2e8425ea 100644 --- a/src/engine/SCons/Tool/mslib.py +++ b/src/engine/SCons/Tool/mslib.py @@ -39,14 +39,14 @@ import SCons.Tool.msvs import SCons.Tool.msvc import SCons.Util -from MSCommon import msvs_exists, merge_default_version +from MSCommon import msvs_exists, msvc_setup_env_once def generate(env): """Add Builders and construction variables for lib to an Environment.""" SCons.Tool.createStaticLibBuilder(env) - # Set-up ms tools paths for default version - merge_default_version(env) + # Set-up ms tools paths + msvc_setup_env_once(env) env['AR'] = 'lib' env['ARFLAGS'] = SCons.Util.CLVar('/nologo') diff --git a/src/engine/SCons/Tool/mslink.py b/src/engine/SCons/Tool/mslink.py index e2ff4ac0..fda37bb6 100644 --- a/src/engine/SCons/Tool/mslink.py +++ b/src/engine/SCons/Tool/mslink.py @@ -44,7 +44,7 @@ import SCons.Tool.msvc import SCons.Tool.msvs import SCons.Util -from MSCommon import merge_default_version, msvs_exists +from MSCommon import msvc_setup_env_once, msvs_exists def pdbGenerator(env, target, source, for_signature): try: @@ -238,8 +238,9 @@ def generate(env): env['REGSVRFLAGS'] = '/s ' env['REGSVRCOM'] = '$REGSVR $REGSVRFLAGS ${TARGET.windows}' - # Set-up ms tools paths for default version - merge_default_version(env) + # Set-up ms tools paths + msvc_setup_env_once(env) + # Loadable modules are on Windows the same as shared libraries, but they # are subject to different build parameters (LDMODULE* variables). diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py index 18051dd2..1b71e53f 100644 --- a/src/engine/SCons/Tool/msvc.py +++ b/src/engine/SCons/Tool/msvc.py @@ -48,7 +48,7 @@ import SCons.Util import SCons.Warnings import SCons.Scanner.RC -from MSCommon import msvc_exists, msvc_setup_env +from MSCommon import msvc_exists, msvc_setup_env_once CSuffixes = ['.c', '.C'] CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++'] @@ -232,8 +232,8 @@ def generate(env): env['SHOBJPREFIX'] = '$OBJPREFIX' env['SHOBJSUFFIX'] = '$OBJSUFFIX' - # Set-up ms tools paths for default version - msvc_setup_env(env) + # Set-up ms tools paths + msvc_setup_env_once(env) import mssdk mssdk.generate(env)