Index: trunk/kBuild/footer.kmk
===================================================================
--- trunk/kBuild/footer.kmk	(revision 2432)
+++ trunk/kBuild/footer.kmk	(revision 2433)
@@ -143,4 +143,6 @@
 # @param    bld_trg      build target.
 # @param    bld_trg_arch build target architecture.
+# @param    bld_type     build target type.
+if 0
 _TARGET_TOOL = $(strip $(firstword \
 	$($(1)_$(2)TOOL.$(bld_trg).$(bld_trg_arch)) \
@@ -156,5 +158,36 @@
 	$(TOOL.$(bld_trg)) \
 	$(TOOL) \
+else
+_TARGET_TOOL = $(strip $(firstword \
+	$($(1)_$(2)TOOL.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
+	$($(1)_$(2)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	$($(1)_$(2)TOOL.$(bld_trg).$(bld_type)) \
+	$($(1)_$(2)TOOL.$(bld_trg_arch)) \
+	$($(1)_$(2)TOOL.$(bld_trg)) \
+	$($(1)_$(2)TOOL.$(bld_type)) \
+	$($(1)_$(2)TOOL) \
+	$($(1)_TOOL.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
+	$($(1)_TOOL.$(bld_trg).$(bld_trg_arch)) \
+	$($(1)_TOOL.$(bld_trg).$(bld_type)) \
+	$($(1)_TOOL.$(bld_trg_arch)) \
+	$($(1)_TOOL.$(bld_trg)) \
+	$($(1)_TOOL.$(bld_type)) \
+	$($(1)_TOOL) \
+	$($(2)TOOL.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
+	$($(2)TOOL.$(bld_trg).$(bld_trg_arch)) \
+	$($(2)TOOL.$(bld_trg).$(bld_type)) \
+	$($(2)TOOL.$(bld_trg_arch)) \
+	$($(2)TOOL.$(bld_trg)) \
+	$($(2)TOOL.$(bld_type)) \
+	$($(2)TOOL) \
+	$(TOOL.$(bld_trg).$(bld_trg_arch).$(bld_type)) \
+	$(TOOL.$(bld_trg).$(bld_trg_arch)) \
+	$(TOOL.$(bld_trg).$(bld_type)) \
+	$(TOOL.$(bld_trg_arch)) \
+	$(TOOL.$(bld_trg)) \
+	$(TOOL.$(bld_type)) \
+	$(TOOL) \
 	))
+endif
 
 ## Figure out the actual name of an installed file.
@@ -1224,5 +1257,7 @@
 local tool        := $(call _TARGET_TOOL,$(target),$(tool_prefix))
 local name        := $(firstword\
+	$($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_NAME.$(bld_trg).$(bld_type))\
 	$($(target)_NAME.$(bld_trg_arch))\
 	$($(target)_NAME.$(bld_trg))\
@@ -1249,5 +1284,5 @@
 
 # INSTARGET_*
-ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_trg_type))),)
+ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),)
  ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),)
   local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)))
@@ -2046,5 +2081,7 @@
 	$($(target)_SOURCES)\
 	$($(target)_SOURCES.$(bld_trg))\
+	$($(target)_SOURCES.$(bld_trg).$(bld_type))\
 	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_SOURCES.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_SOURCES.$(bld_trg_arch))\
 	$($(target)_SOURCES.$(bld_trg_cpu))\
@@ -2055,5 +2092,7 @@
 	$($(target)_GEN_SOURCES_)\
 	$($(target)_GEN_SOURCES_.$(bld_trg))\
+	$($(target)_GEN_SOURCES_.$(bld_trg).$(bld_type))\
 	$($(target)_GEN_SOURCES_.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_GEN_SOURCES_.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_GEN_SOURCES_.$(bld_trg_arch))\
 	$($(target)_GEN_SOURCES_.$(bld_trg_cpu))\
@@ -2074,5 +2113,5 @@
 # @remark   Only library uses this now.
 define def_target_install_pluss
-ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_trg_type))),)
+ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),)
  ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),)
   local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)))
@@ -2159,5 +2198,7 @@
 endif
 local name        := $(firstword\
+	$($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_NAME.$(bld_trg).$(bld_type))\
 	$($(target)_NAME.$(bld_trg_arch))\
 	$($(target)_NAME.$(bld_trg))\
@@ -2199,5 +2240,7 @@
 local tool        := $(call _TARGET_TOOL,$(target),AR)
 local name        := $(firstword\
+	$($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_NAME.$(bld_trg).$(bld_type))\
 	$($(target)_NAME.$(bld_trg_arch))\
 	$($(target)_NAME.$(bld_trg))\
@@ -2409,5 +2452,7 @@
 local tool        := $(call _TARGET_TOOL,$(target),LD)
 local name        := $(firstword\
+	$($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_NAME.$(bld_trg).$(bld_type))\
 	$($(target)_NAME.$(bld_trg_arch))\
 	$($(target)_NAME.$(bld_trg))\
@@ -2449,5 +2494,7 @@
 local tool        := $(call _TARGET_TOOL,$(target),LD)
 local name        := $(firstword\
+	$($(target)_NAME.$(bld_trg).$(bld_trg_arch).$(bld_type))\
 	$($(target)_NAME.$(bld_trg).$(bld_trg_arch))\
+	$($(target)_NAME.$(bld_trg).$(bld_type))\
 	$($(target)_NAME.$(bld_trg_arch))\
 	$($(target)_NAME.$(bld_trg))\
@@ -2690,5 +2737,5 @@
 
 # installation targets
-ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_trg_type))),)
+ifeq ($(strip $($(target)_NOINST) $($(target)_NOINST.$(bld_trg)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg).$(bld_trg_arch).$(bld_type))  $($(target)_NOINST.$(bld_trg_arch)) $($(target)_NOINST.$(bld_trg_cpu)) $($(target)_NOINST.$(bld_type))),)
  ifneq ($(strip $($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type))),)
   local inst := $(addprefix $(PATH_INS)/,$($(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type)))
