scons: Cleanup.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 16 Apr 2009 20:41:01 +0000 (21:41 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 17 Apr 2009 08:49:41 +0000 (09:49 +0100)
scons/mslib_sa.py
scons/winsdk.py

index c5ebdec273f233b5655c5530702402e60d12726d..50d47ee37bd95a7ee59d9517633794e65cf855e1 100644 (file)
@@ -118,12 +118,10 @@ def generate(env):
 
     if env.Detect('lib'):
         env['AR']          = 'lib'
-    elif env.Detect('link'):
+    else:
         # Recent WINDDK versions do not ship with lib.
         env['AR']          = 'link /lib'
         env['TEMPFILE']    = TempFileMunge
-    else:
-        raise SCons.Errors.InternalError, "lib and link not found"
     env['ARFLAGS']     = SCons.Util.CLVar('/nologo')
     env['ARCOM']       = "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}"
     env['LIBPREFIX']   = ''
index 255f9c5a654dcaa6b39c0107bceb274052598519..7e874a507b8b6e75c71a93d826dcfe0a0c7d02ba 100644 (file)
@@ -77,13 +77,9 @@ def get_vc_paths(env):
         raise SCons.Errors.InternalError, "Unsupported target machine"
     include_dir = 'include'
 
-    exe_path     = os.path.join(vc_root, bin_dir)
-    include_path = os.path.join(vc_root, include_dir)
-    lib_path     = os.path.join(vc_root, lib_dir)
-
-    env.PrependENVPath('INCLUDE', include_path)
-    env.PrependENVPath('LIB', lib_path)
-    env.PrependENVPath('PATH', exe_path)
+    env.PrependENVPath('PATH',    os.path.join(vc_root, bin_dir))
+    env.PrependENVPath('INCLUDE', os.path.join(vc_root, include_dir))
+    env.PrependENVPath('LIB',     os.path.join(vc_root, lib_dir))
 
 def get_sdk_root(env):
     if SCons.Util.can_read_reg:
@@ -108,18 +104,14 @@ def get_sdk_paths(env):
     if target_cpu in ('generic', 'x86'):
         lib_dir = 'Lib'
     elif target_cpu == 'x86_64':
-        lib_dir = 'Lib/x64'
+        lib_dir = r'Lib\x64'
     else:
         raise SCons.Errors.InternalError, "Unsupported target machine"
     include_dir = 'Include'
 
-    exe_path     = os.path.join(sdk_root, bin_dir)
-    include_path = os.path.join(sdk_root, include_dir)
-    lib_path     = os.path.join(sdk_root, lib_dir)
-
-    env.PrependENVPath('INCLUDE', include_path)
-    env.PrependENVPath('LIB', lib_path)
-    env.PrependENVPath('PATH', exe_path)
+    env.PrependENVPath('PATH',    os.path.join(sdk_root, bin_dir))
+    env.PrependENVPath('INCLUDE', os.path.join(sdk_root, include_dir))
+    env.PrependENVPath('LIB',     os.path.join(sdk_root, lib_dir))
 
 def generate(env):
     if not env.has_key('ENV'):