Index: /trunk/kBuild/footer.kmk
===================================================================
--- /trunk/kBuild/footer.kmk	(revision 659)
+++ /trunk/kBuild/footer.kmk	(revision 660)
@@ -271,10 +271,10 @@
 
   # inherit properties.
-  $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED)\
-    $(addsuffix .$(BUILD_TARGET),                      $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-    $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-    $(addsuffix .$(BUILD_TARGET_ARCH),                 $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-    $(addsuffix .$(BUILD_TARGET_CPU),                  $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
-    $(addsuffix .$(BUILD_TYPE),                        $(PROPS_SINGLE) $(PROPS_ACCUMULATE) $(PROPS_DEFERRED))\
+  $(foreach prop, $(PROPS_SINGLE) $(PROPS_ACCUMULATE_R) $(PROPS_ACCUMULATE_L) $(PROPS_DEFERRED)\
+    $(addsuffix .$(BUILD_TARGET),                      $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\
+    $(addsuffix .$(BUILD_TARGET).$(BUILD_TARGET_ARCH), $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\
+    $(addsuffix .$(BUILD_TARGET_ARCH),                 $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\
+    $(addsuffix .$(BUILD_TARGET_CPU),                  $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\
+    $(addsuffix .$(BUILD_TYPE),                        $(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) $(PROPS_DEFERRED))\
     ,$(eval $(def_template_extends_prop))) # exploits the 2 evaluation, so no value!
 
@@ -372,8 +372,8 @@
 endef
 
-## Inherit one template property.
+## Inherit one acculumlative template property where the 'most significant' items are at the left end.
 # @param    $(prop)     Property name
 # @param    $(target)	Target name
-define def_inherit_template_one_accumulate
+define def_inherit_template_one_accumulate_l
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
 #$ (warning dbgtype: TEMPLATE_$($(target)_TEMPLATE)_$(prop) $(target)_$(prop)=$($(target)_$(prop)) $(TEMPLATE_$($(target)_TEMPLATE)_$(prop)))
@@ -402,4 +402,55 @@
 endif
 endef
+
+## Inherit one acculumlative template property where the 'most significant' items are at the right end.
+# First pass, $(value) referenced.
+# @param    $(prop)     Property name
+# @param    $(target)	Target name
+define def_inherit_template_one_accumulate_r1
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
+_$(target)_$(prop)_R := $(value $(target)_$(prop))
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)
+_$(target)_$(prop).$(BUILD_TYPE)_R := $(value $(target)_$(prop).$(BUILD_TYPE))
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
+_$(target)_$(prop).$(bld_trg)_R := $(value $(target)_$(prop).$(bld_trg))
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+_$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R := $(value $(target)_$(prop).$(bld_trg).$(bld_trg_arch))
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
+_$(target)_$(prop).$(bld_trg_cpu)_R := $(value $(target)_$(prop).$(bld_trg_cpu))
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
+_$(target)_$(prop).$(bld_trg_arch)_R := $(value $(target)_$(prop).$(bld_trg_arch))
+endif
+endef
+
+## Inherit one template property the other way around.
+# Second pass, not $(value) referenced.
+# @param    $(prop)     Property name
+# @param    $(target)	Target name
+define def_inherit_template_one_accumulate_r2
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
+$(target)_$(prop) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop)) $$(_$(target)_$(prop)_R)
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)
+$(target)_$(prop).$(BUILD_TYPE) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(BUILD_TYPE)) $$(_$(target)_$(prop).$(BUILD_TYPE)_R)
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
+$(target)_$(prop).$(bld_trg) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)) $$(_$(target)_$(prop).$(bld_trg)_R)
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+$(target)_$(prop).$(bld_trg).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg).$(bld_trg_arch)_R)
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
+$(target)_$(prop).$(bld_trg_cpu) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)) $$(_$(target)_$(prop).$(bld_trg_cpu)_R)
+endif
+ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
+$(target)_$(prop).$(bld_trg_arch) = $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)) $$(_$(target)_$(prop).$(bld_trg_arch)_R)
+endif
+endef
+
 
 ## Inherit template properties for on target.
@@ -416,5 +467,9 @@
 $(foreach prop,$(PROPS_SINGLE),$(eval $(value def_inherit_template_one)))
 $(foreach prop,$(PROPS_DEFERRED),$(eval $(def_inherit_template_one_deferred))) # exploits the 2 evaluation, so no value!
-$(foreach prop,$(PROPS_ACCUMULATE),$(eval $(def_inherit_template_one_accumulate))) # += works fine (better) without value.
+$(foreach prop,$(PROPS_ACCUMULATE_L),$(eval $(def_inherit_template_one_accumulate_l))) # += works fine (better) without value.
+$(foreach prop,$(PROPS_ACCUMULATE_R),\
+$(eval $(value def_inherit_template_one_accumulate_r1))\
+$(eval $(def_inherit_template_one_accumulate_r2))\
+) # This is a hack! (but it appears to work)
 endif
 endef
@@ -2350,5 +2405,5 @@
 	@$(ECHO) "  TARGET_$(target)=$(TARGET_$(target))" $(NLTAB)\
 	@$(ECHO) "  INSTARGET_$(target)=$(INSTARGET_$(target))" $(NLTAB)\
-$(foreach prop,$(PROPS_SINGLE) $(PROPS_ACCUMULATE) OBJS_ CLEAN, \
+$(foreach prop,$(PROPS_SINGLE) $(PROPS_ACCUMULATE_L) $(PROPS_ACCUMULATE_R) OBJS_ CLEAN, \
 	$(eval _tmp:=$(firstword $($(target)_BLD_TRG) $(BUILD_TARGET))) \
 	$(if $($(target)_$(prop).$(_tmp)),\
Index: /trunk/kBuild/header.kmk
===================================================================
--- /trunk/kBuild/header.kmk	(revision 659)
+++ /trunk/kBuild/header.kmk	(revision 660)
@@ -524,15 +524,27 @@
 PROPS_DEFERRED := INSTFUN INSTALLER
 
-## PROPS_ACCUMULATE
-# The list of accumulative target properties.
+## PROPS_ACCUMULATE_R
+# The list of accumulative target properties where the right most value/flag 
+# is the 'most significant'.
 # A Config.kmk file can add it's own properties to this list and kBuild
 # will do the necessary inheritance from templates to targets.
-PROPS_ACCUMULATE := \
-	SDKS DEFS DEPS INCS SOURCES \
-	COPTS CFLAGS CDEFS CINCS CXXOPTS CXXFLAGS CXXDEFS CXXINCS \
-	ASOPTS ASFLAGS ASDEFS ASINCS \
-	RCOPTS RCFLAGS RCDEFS RCINCS \
-	LDFLAGS LIBS LIBPATH \
+PROPS_ACCUMULATE_R := \
+	DEFS DEPS \
+	CFLAGS CDEFS \
+	CXXFLAGS CXXDEFS \
+	ASFLAGS ASDEFS \
+	RCFLAGS RCDEFS \
+	LDFLAGS \
 	FETCHFLAGS UNPACKFLAGS PATCHFLAGS
+
+## PROPS_ACCUMULATE
+# The list of accumulative target properties where the left most value/flag 
+# is the 'most significant'.
+# A Config.kmk file can add it's own properties to this list and kBuild
+# will do the necessary inheritance from templates to targets.
+PROPS_ACCUMULATE_L := \
+	SDKS SOURCES \
+	INCS CINCS CXXINCX ASINCS RCINCS \
+	LIBS LIBPATH
 
 
