Index: trunk/kBuild/tools/VCC70.kmk
===================================================================
--- trunk/kBuild/tools/VCC70.kmk	(revision 676)
+++ trunk/kBuild/tools/VCC70.kmk	(revision 677)
@@ -29,30 +29,37 @@
 # Tool Specific Properties
 ifndef PATH_TOOL_VCC70
- PATH_TOOL_VCC70 := $(wildcard $(PATH_DEVTOOLS)/x86.win/vcc/v7)
+ PATH_TOOL_VCC70 := $(wildcard $(PATH_DEVTOOLS)/x86.win/vcc/v7 \
+							   $(PATH_DEVTOOLS)/x86.win32/vcc/v7 \
+							   $(PATH_DEVTOOLS)/x86.win32/vcc70)
  ifeq ($(PATH_TOOL_VCC70),)
-  PATH_TOOL_VCC70 := $(wildcard $(PATH_DEVTOOLS)/x86.win32/vcc/v7)
+  PATH_TOOL_VCC70 := $(firstword $(PATH_TOOL_VCC70))
  endif
- ifeq ($(PATH_TOOL_VCC70),)
-  PATH_TOOL_VCC70 := $(PATH_DEVTOOLS)/x86.win32/vcc70
- endif
- ifneq ($(PATH_TOOL_VCC70),)
-  # done
- else
-  $(warning kBuild: PATH_TOOL_VCC70 cannot be determined!)
-  PATH_TOOL_VCC70 := $(PATH_DEVTOOLS)/x86.win/vcc/v7
- endif
-endif
-PATH_TOOL_VCC70_BIN ?= $(PATH_TOOL_VCC70)/bin
-PATH_TOOL_VCC70_LIB ?= $(PATH_TOOL_VCC70)/lib
-PATH_TOOL_VCC70_INC ?= $(PATH_TOOL_VCC70)/include
-PATH_TOOL_VCC70_ATLMFC ?= $(PATH_TOOL_VCC70)/atlmfc
-PATH_TOOL_VCC70_ATLMFC_INC ?= $(PATH_TOOL_VCC70_ATLMFC)/include
-PATH_TOOL_VCC70_ATLMFC_LIB ?= $(PATH_TOOL_VCC70_ATLMFC)/lib
-TOOL_VCC70_CC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
-TOOL_VCC70_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
-TOOL_VCC70_AS  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/ml.exe
-TOOL_VCC70_RC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/rc.exe
-TOOL_VCC70_AR  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/lib.exe
-TOOL_VCC70_LD  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/link.exe
+ # if not found, we'll enter 'pathless' mode.
+else
+ # Resolve any fancy stuff once and for all.
+ PATH_TOOL_VCC70 := $(PATH_TOOL_VCC70)
+endif
+ifneq ($(PATH_TOOL_VCC70),)
+ PATH_TOOL_VCC70_BIN ?= $(PATH_TOOL_VCC70)/bin
+ PATH_TOOL_VCC70_LIB ?= $(PATH_TOOL_VCC70)/lib
+ PATH_TOOL_VCC70_INC ?= $(PATH_TOOL_VCC70)/include
+ PATH_TOOL_VCC70_ATLMFC ?= $(PATH_TOOL_VCC70)/atlmfc
+ PATH_TOOL_VCC70_ATLMFC_INC ?= $(PATH_TOOL_VCC70_ATLMFC)/include
+ PATH_TOOL_VCC70_ATLMFC_LIB ?= $(PATH_TOOL_VCC70_ATLMFC)/lib
+ TOOL_VCC70_CC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
+ TOOL_VCC70_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/cl.exe
+ TOOL_VCC70_AS  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/ml.exe
+ TOOL_VCC70_RC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/rc.exe
+ TOOL_VCC70_AR  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/lib.exe
+ TOOL_VCC70_LD  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC70_BIN)/link.exe
+else
+ # Pathless, relies on the environment.
+ TOOL_VCC70_CC  ?= $(EXEC_X86_WIN32) cl.exe
+ TOOL_VCC70_CXX ?= $(EXEC_X86_WIN32) cl.exe
+ TOOL_VCC70_AS  ?= $(EXEC_X86_WIN32) ml.exe
+ TOOL_VCC70_RC  ?= $(EXEC_X86_WIN32) rc.exe
+ TOOL_VCC70_AR  ?= $(EXEC_X86_WIN32) lib.exe
+ TOOL_VCC70_LD  ?= $(EXEC_X86_WIN32) link.exe
+endif
 VCC70_NEW_DEPS = 1 ##< Enables fast DEP_IDB based dependencies.
 
Index: trunk/kBuild/tools/VCC80.kmk
===================================================================
--- trunk/kBuild/tools/VCC80.kmk	(revision 676)
+++ trunk/kBuild/tools/VCC80.kmk	(revision 677)
@@ -29,47 +29,50 @@
 # Tool Specific Properties
 ifndef PATH_TOOL_VCC80
- PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS_TRG)/vcc/v8)
+ PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS_TRG)/vcc/v8 \
+                               $(PATH_DEVTOOLS)/x86.win/vcc/v8 \
+                               $(PATH_DEVTOOLS)/x86.win32/vcc/v8 \
+                               $(PATH_DEVTOOLS)/amd64.win/vcc/v8)
  ifeq ($(PATH_TOOL_VCC80),)
-  PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/x86.win/vcc/v8)
+  PATH_TOOL_VCC80 := $(firstword $(PATH_TOOL_VCC80))
  endif
- ifeq ($(PATH_TOOL_VCC80),)
-  PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/x86.win32/vcc/v8)
- endif
- ifeq ($(PATH_TOOL_VCC80),)
-  PATH_TOOL_VCC80 := $(wildcard $(PATH_DEVTOOLS)/amd64.win/vcc/v8)
- endif
- ifneq ($(PATH_TOOL_VCC80),)
-  # done for now
- else
-  $(warning kBuild: PATH_TOOL_VCC80 cannot be determined!)
-  PATH_TOOL_VCC80 := $(PATH_DEVTOOLS_TRG)/vcc/v8
- endif
+ # if not found, we'll enter 'pathless' mode.
 else
  # Resolve any fancy stuff once and for all.
  PATH_TOOL_VCC80 := $(PATH_TOOL_VCC80)
 endif
-ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),win.amd64)
-PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/amd64
-else
-PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/x86_amd64
-endif
-PATH_TOOL_VCC80_BIN.x86   ?= $(PATH_TOOL_VCC80)/bin
-PATH_TOOL_VCC80_BIN       ?= $(PATH_TOOL_VCC80_BIN.$(BUILD_TARGET))
-PATH_TOOL_VCC80_LIB.amd64 ?= $(PATH_TOOL_VCC80)/lib/amd64
-PATH_TOOL_VCC80_LIB.x86   ?= $(PATH_TOOL_VCC80)/lib
-PATH_TOOL_VCC80_LIB       ?= $(PATH_TOOL_VCC80_LIB.$(BUILD_TARGET))
-PATH_TOOL_VCC80_INC       ?= $(PATH_TOOL_VCC80)/include
-PATH_TOOL_VCC80_ATLMFC    ?= $(PATH_TOOL_VCC80X86)/atlmfc
-PATH_TOOL_VCC80_ATLMFC_INC       ?= $(PATH_TOOL_VCC80_ATLMFC)/include
-PATH_TOOL_VCC80_ATLMFC_LIB.amd64 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib
-PATH_TOOL_VCC80_ATLMFC_LIB.x86   ?= $(PATH_TOOL_VCC80_ATLMFC)/lib/amd64
-PATH_TOOL_VCC80_ATLMFC_LIB       ?= $(PATH_TOOL_VCC80_ATLMFC_LIB.$(BUILD_TARGET))
-TOOL_VCC80_CC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
-TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
-TOOL_VCC80_AS  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/ml64.exe
-TOOL_VCC80_RC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/../rc.exe
-TOOL_VCC80_AR  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/lib.exe
-TOOL_VCC80_LD  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/link.exe
-TOOL_VCC80_MT  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/../mt.exe
+ifneq ($(PATH_TOOL_VCC80),)
+ ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),win.amd64)
+ PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/amd64
+ else
+ PATH_TOOL_VCC80_BIN.amd64 ?= $(PATH_TOOL_VCC80)/bin/x86_amd64
+ endif
+ PATH_TOOL_VCC80_BIN.x86   ?= $(PATH_TOOL_VCC80)/bin
+ PATH_TOOL_VCC80_BIN       ?= $(PATH_TOOL_VCC80_BIN.$(BUILD_TARGET))
+ PATH_TOOL_VCC80_LIB.amd64 ?= $(PATH_TOOL_VCC80)/lib/amd64
+ PATH_TOOL_VCC80_LIB.x86   ?= $(PATH_TOOL_VCC80)/lib
+ PATH_TOOL_VCC80_LIB       ?= $(PATH_TOOL_VCC80_LIB.$(BUILD_TARGET))
+ PATH_TOOL_VCC80_INC       ?= $(PATH_TOOL_VCC80)/include
+ PATH_TOOL_VCC80_ATLMFC    ?= $(PATH_TOOL_VCC80X86)/atlmfc
+ PATH_TOOL_VCC80_ATLMFC_INC       ?= $(PATH_TOOL_VCC80_ATLMFC)/include
+ PATH_TOOL_VCC80_ATLMFC_LIB.amd64 ?= $(PATH_TOOL_VCC80_ATLMFC)/lib
+ PATH_TOOL_VCC80_ATLMFC_LIB.x86   ?= $(PATH_TOOL_VCC80_ATLMFC)/lib/amd64
+ PATH_TOOL_VCC80_ATLMFC_LIB       ?= $(PATH_TOOL_VCC80_ATLMFC_LIB.$(BUILD_TARGET))
+ TOOL_VCC80_CC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
+ TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/cl.exe
+ TOOL_VCC80_AS  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/ml64.exe
+ TOOL_VCC80_RC  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/rc.exe
+ TOOL_VCC80_AR  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/lib.exe
+ TOOL_VCC80_LD  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN)/link.exe
+ TOOL_VCC80_MT  ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC80_BIN.x86)/mt.exe
+else 
+ # Pathless, relies on the environment.
+ TOOL_VCC80_CC  ?= $(EXEC_X86_WIN32) cl.exe
+ TOOL_VCC80_CXX ?= $(EXEC_X86_WIN32) cl.exe
+ TOOL_VCC80_AS  ?= $(EXEC_X86_WIN32) ml64.exe
+ TOOL_VCC80_RC  ?= $(EXEC_X86_WIN32) rc.exe
+ TOOL_VCC80_AR  ?= $(EXEC_X86_WIN32) lib.exe
+ TOOL_VCC80_LD  ?= $(EXEC_X86_WIN32) link.exe
+ TOOL_VCC80_MT  ?= $(EXEC_X86_WIN32) mt.exe
+endif
 VCC80_NEW_DEPS = 1 ##< Enables fast DEP_IDB based dependencies.
 
@@ -114,4 +117,6 @@
 TOOL_VCC80_LDFLAGS.debug    ?= -debug
 TOOL_VCC80_LDFLAGS.release  ?=
+TOOL_VCC80_LIBPATH.amd64    ?= $(PATH_TOOL_VCC80_LIB.amd64) $(PATH_TOOL_VCC80_ATLMFC_LIB.amd64)
+TOOL_VCC80_LIBPATH.x86      ?= $(PATH_TOOL_VCC80_LIB.x86) $(PATH_TOOL_VCC80_ATLMFC_LIB.x86)
 
 
