Index: trunk/kBuild/footer.kmk
===================================================================
--- trunk/kBuild/footer.kmk	(revision 983)
+++ trunk/kBuild/footer.kmk	(revision 984)
@@ -34,5 +34,5 @@
 
 # all targets.
-ALL_TARGETS += \
+_ALL_TARGETS := \
 	$(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
 	$(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
@@ -47,5 +47,5 @@
 
 # all $(BUILD_TARGET) targets.
-_ALL_BUILD_TARGET_TARGETS += \
+_ALL_BUILD_TARGET_TARGETS := \
 	$(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
 	$(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
@@ -59,9 +59,21 @@
 
 # all $(BUILD_TARGET) targets.
-_ALL_BUILD_PLATFORM_TARGETS += \
+_ALL_BUILD_PLATFORM_TARGETS := \
 	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH))
 
+## all linkable targets.
+#_ALL_LINKABLE_TARGETS := \
+#	$(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) \
+#	$(DLLS)        $(DLLS.$(BUILD_TARGET))          $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+#	$(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET))      $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+#	$(SYSMODS)     $(SYSMODS.$(BUILD_TARGET))       $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
+#
+## all library targets.
+#_ALL_LIBRARY_TARGETS := \
+#	$(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET))     $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+#	$(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET))   $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
+
 # all targets making use of srcname.
-_ALL_SRCNAME_TARGETS += \
+_ALL_SRCNAME_TARGETS := \
 	$(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
 	$(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
@@ -106,6 +118,7 @@
 
 
-#
-# Basic macros
+
+#
+# Footer macros
 #
 
@@ -138,12 +151,4 @@
 
 
-#
-# Include the additional footer macros when bootstrapping kBuild.
-#
-ifndef KMK_VERSION
- include $(PATH_KBUILD)/gnumake-footer.kmk
-endif
-
-
 
 #
@@ -158,5 +163,11 @@
 endif
 endef
-$(foreach target, $(ALL_TARGETS),$(eval $(def_check_target)))
+$(foreach target, $(_ALL_TARGETS),$(eval $(def_check_target)))
+
+
+#
+# Target inheritance.
+#
+# $ (foreach ...
 
 
@@ -170,5 +181,5 @@
 endif
 endef
-$(foreach target, $(ALL_TARGETS), $(eval $(def_templates)))
+$(foreach target, $(_ALL_TARGETS), $(eval $(def_templates)))
 _TEMPLATES := $(sort $(_TEMPLATES))
 # $ (warning dbg: _TEMPLATES=$(_TEMPLATES))
@@ -1139,16 +1150,9 @@
 endif
 
-## Temporary macro for testing the new multi target rules.
-ifdef USE_MULTI_TARGET
- _M_PLUSS=+
-else
- _M_PLUSS=
-endif
-
 ## Generates the rules for building a specific object, and the aliases
 # for building a source file.
 # @param    $(obj)    The object file.
 define def_target_source_rule
-$(obj) $(_M_PLUSS) $($(target)_$(source)_OUTPUT_): \
+$(obj) + $($(target)_$(source)_OUTPUT_) : \
 		$($(target)_$(source)_DEPEND_) \
 		$(_DEP_COMPILE_CMDS) \
@@ -1194,5 +1198,5 @@
 # @param    $($(target)_CMDS_PREV_) The link commands from the previous run.
 define def_link_rule
-$(out) $(_M_PLUSS) $($(target)_OUTPUT_): \
+$(out) + $($(target)_OUTPUT_) : \
 		$($(target)_DEPEND_) \
 		$(_DEP_LINK_CMDS) \
@@ -2456,5 +2460,5 @@
 #
 show_targets:
-	@$(foreach target, $(ALL_TARGETS),\
+	@$(foreach target, $(_ALL_TARGETS),\
 	@$(ECHO) "target: $(target)" $(NLTAB)\
 	@$(ECHO) "  PATH_$(target)=$(PATH_$(target))" $(NLTAB)\
Index: trunk/kBuild/header.kmk
===================================================================
--- trunk/kBuild/header.kmk	(revision 983)
+++ trunk/kBuild/header.kmk	(revision 984)
@@ -33,5 +33,5 @@
 #
 ifndef KMK_VERSION
- $(error kBuild: The kmk default variable KMK_VERSION isn't defined! Make sure you are using 'kmk' and not 'make', 'gmake', 'kmk_gmake', 'dmake' or any other make program.)
+ $(error kBuild: The kmk default variable KMK_VERSION isn't defined! Make sure you are using 'kmk' and not 'make', 'gmake', 'kmk_gmake', 'dmake' or any other make program)
 endif
 ifneq ($(KBUILD_VERSION_MAJOR).$(KBUILD_VERSION_MINOR),0.1)
@@ -129,5 +129,5 @@
 # to be assigned to it and added here. This strictness is required because
 # this keyword namespace is shared between OSes, architectures, cpus and
-# build types.
+# build types. (PORTME)
 #
 KBUILD_OSES   = darwin freebsd l4 linux netbsd nt openbsd os2 solaris win
@@ -304,5 +304,7 @@
 #
 # Build platform setup.
-#
+# (PORTME)
+#
+
 # OS/2
 ifeq ($(BUILD_PLATFORM),os2)
@@ -344,4 +346,5 @@
 #
 # Build target setup.
+# (PORTME)
 #
 SUFF_DEP            := .dep
@@ -469,5 +472,5 @@
 # @param	$1	The paths to make absolute.
 # @obsolete Use the GNU make function $(abspath) directly now.
-ABSPATH = $(abspath $(1))
+ABSPATH = $(abspath $(1))$(warning ABSPATH is deprecated, use abspath directly!)
 
 ## DIRDEP - make create directory dependencies.
@@ -510,8 +513,4 @@
 # others can add stuff to if they like for processing in the footer.
 #
-
-## ALL_TARGET
-# This is the list of all targets.
-ALL_TARGETS :=
 
 ## TEMPLATE_PATHS
@@ -709,4 +708,18 @@
 
 #
+# Check for --pretty-command-printing before including the Config.kmk
+# so that anyone overriding the message macros can take the implied
+# verbosity level change into account.
+#
+ifndef KBUILD_VERBOSE
+ ifndef KBUILD_QUIET
+  ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),)
+   export KBUILD_VERBOSE := 2
+  endif
+ endif
+endif
+
+
+#
 # This is how we find the closest config.kmk.
 # It's a little hacky but I think it works fine.
@@ -727,19 +740,4 @@
 $(error kBuild: no Config.kmk file found! Check the DEPTH: DEPTH='$(DEPTH)' PATH_CURRENT='$(PATH_CURRENT)')
 endif
-
-
-#
-# Check for --pretty-command-printing before including the Config.kmk
-# so that anyone overriding the message macros can take the implied
-# verbosity level change into account.
-#
-ifndef KBUILD_VERBOSE
- ifndef KBUILD_QUIET
-  ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),)
-   export KBUILD_VERBOSE := 2
-  endif
- endif
-endif
-
 
 # Include the config.kmk we found file (or the default one).
