Index: /trunk/kBuild/footer.kmk
===================================================================
--- /trunk/kBuild/footer.kmk	(revision 2006)
+++ /trunk/kBuild/footer.kmk	(revision 2007)
@@ -165,4 +165,13 @@
 
 
+## Converts a variable from simple to recursive flavor.
+# This is used by def_inherit_template_one_accumulate_l and def_inherit_template_one_accumulate_r.
+# @param    $1              The variable name.
+define def_simple_2_recursive
+$1_DEFERRED := $$($1)
+$1 = $$($1_DEFERRED)
+endef
+
+
 ## Inherit one keyword in a non-accumulative manner.
 # @param    $(trg)          Target object.
@@ -277,4 +286,7 @@
 define def_inherit_one_keyword_prepending_deferred_l
 ifdef $(trg)_$(prop).$(src_key)
+ ifeq ($$(flavor $(trg)_$(prop).$(trg_key)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop).$(trg_key))
+ endif
  $(trg)_$(prop).$(trg_key) <= $$($(trg)_$(prop).$(src_key))
 endif
@@ -284,5 +296,8 @@
 define def_inherit_one_keyword_prepending_deferred_r
 ifdef $(trg)_$(prop).$(src_key)
-  $(trg)_$(prop).$(trg_key) += $$($(trg)_$(prop).$(src_key))
+ ifeq ($$(flavor $(trg)_$(prop).$(trg_key)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop).$(trg_key))
+ endif
+ $(trg)_$(prop).$(trg_key) += $$($(trg)_$(prop).$(src_key))
 endif
 endef
@@ -330,4 +345,7 @@
 define def_inherit_one_keyword_appending_deferred_l
 ifdef $(trg)_$(prop).$(src_key)
+ ifeq ($$(flavor $(trg)_$(prop).$(trg_key)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop).$(trg_key))
+ endif
  $(trg)_$(prop).$(trg_key) += $$($(trg)_$(prop).$(src_key))
 endif
@@ -337,5 +355,8 @@
 define def_inherit_one_keyword_appending_deferred_r
 ifdef $(trg)_$(prop).$(src_key)
-  $(trg)_$(prop).$(trg_key) <= $$($(trg)_$(prop).$(src_key))
+ ifeq ($$(flavor $(trg)_$(prop).$(trg_key)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop).$(trg_key))
+ endif
+ $(trg)_$(prop).$(trg_key) <= $$($(trg)_$(prop).$(src_key))
 endif
 endef
@@ -475,4 +496,7 @@
 define def_inherit_one_prepending_deferred_l
 ifdef $(src)_$(prop)
+ ifeq ($$(flavor $(trg)_$(prop)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop))
+ endif
  $(trg)_$(prop) <= $$($(src)_$(prop))
 endif
@@ -482,5 +506,8 @@
 define def_inherit_one_prepending_deferred_r
 ifdef $(src)_$(prop)
-  $(trg)_$(prop) += $$($(src)_$(prop))
+ ifeq ($$(flavor $(trg)_$(prop)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop))
+ endif
+ $(trg)_$(prop) += $$($(src)_$(prop))
 endif
 endef
@@ -525,4 +552,7 @@
 define def_inherit_one_appending_deferred_l
 ifdef $(src)_$(prop)
+ ifeq ($$(flavor $(trg)_$(prop)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop))
+ endif
  $(trg)_$(prop) += $$($(src)_$(prop))
 endif
@@ -532,5 +562,8 @@
 define def_inherit_one_appending_deferred_r
 ifdef $(src)_$(prop)
-  $(trg)_$(prop) <= $$($(src)_$(prop))
+ ifeq ($$(flavor $(trg)_$(prop)),simple)
+  $$(evalcall2 def_simple_2_recursive,$(trg)_$(prop))
+ endif
+ $(trg)_$(prop) <= $$($(src)_$(prop))
 endif
 endef
@@ -1023,19 +1056,37 @@
 define def_inherit_template_one_accumulate_l
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
+ ifeq ($$(flavor $(target)_$(prop)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop))
+ endif
 $(target)_$(prop) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(KBUILD_TYPE)
+ ifeq ($$(flavor $(target)_$(prop).$(KBUILD_TYPE)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(KBUILD_TYPE))
+ endif
 $(target)_$(prop).$(KBUILD_TYPE) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(KBUILD_TYPE))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg))
+ endif
 $(target)_$(prop).$(bld_trg) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg).$(bld_trg_arch)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg).$(bld_trg_arch))
+ endif
 $(target)_$(prop).$(bld_trg).$(bld_trg_arch) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg_cpu)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg_cpu))
+ endif
 $(target)_$(prop).$(bld_trg_cpu) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg_arch)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg_arch))
+ endif
 $(target)_$(prop).$(bld_trg_arch) += $$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch))
 endif
@@ -1047,19 +1098,37 @@
 define def_inherit_template_one_accumulate_r
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop)
+ ifeq ($$(flavor $(target)_$(prop)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop))
+ endif
 $(target)_$(prop) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(KBUILD_TYPE)
+ ifeq ($$(flavor $(target)_$(prop).$(KBUILD_TYPE)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(KBUILD_TYPE))
+ endif
 $(target)_$(prop).$(KBUILD_TYPE) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(KBUILD_TYPE))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg))
+ endif
 $(target)_$(prop).$(bld_trg) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg).$(bld_trg_arch)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg).$(bld_trg_arch))
+ endif
 $(target)_$(prop).$(bld_trg).$(bld_trg_arch) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg).$(bld_trg_arch))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg_cpu)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg_cpu))
+ endif
 $(target)_$(prop).$(bld_trg_cpu) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_cpu))
 endif
 ifdef TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch)
+ ifeq ($$(flavor $(target)_$(prop).$(bld_trg_arch)),simple)
+ $$(evalcall2 def_simple_2_recursive,$(target)_$(prop).$(bld_trg_arch))
+ endif
 $(target)_$(prop).$(bld_trg_arch) <=$$(TEMPLATE_$($(target)_TEMPLATE)_$(prop).$(bld_trg_arch))
 endif
Index: /trunk/tests/Makefile.kmk
===================================================================
--- /trunk/tests/Makefile.kmk	(revision 2006)
+++ /trunk/tests/Makefile.kmk	(revision 2007)
@@ -31,4 +31,5 @@
 	inherit-target \
 	inherit-bld \
+	inherit-misc \
 
 include $(FILE_KBUILD_FOOTER)
Index: /trunk/tests/inherit-misc/Makefile.kmk
===================================================================
--- /trunk/tests/inherit-misc/Makefile.kmk	(revision 2007)
+++ /trunk/tests/inherit-misc/Makefile.kmk	(revision 2007)
@@ -0,0 +1,52 @@
+# $Id$
+## @file
+# Test - Misc Inheritance.
+#
+
+#
+# Copyright (c) 2008 knut st. osmundsen <bird-src-spam@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#
+
+
+DEPTH = ../..
+include $(PATH_KBUILD)/header.kmk
+
+#
+# Search for SDKs in the current directory.
+#
+KBUILD_SDK_PATHS := $(PATH_SUB_CURRENT)
+
+#
+# Tests for checking that prepending and appending of properties
+# that have been defined as simple variables work. Ticket #51.
+# (This is a little bit out of place, but so what.)
+#
+PROGRAMS += inherit-misc51a
+inherit-misc51a_TEMPLATE := tmpl51a
+inherit-misc51a_SDKS := sdk51a-xz
+inherit-misc51a_DEFS := X=z
+inherit-misc51a_SOURCES := ../dummy_defined_X.c
+
+TEMPLATE_tmpl51a = inherit-misc51 template
+TEMPLATE_tmpl51a_EXTENDS = TST
+TEMPLATE_tmpl51a_DEFS = $(SDK_sdk51a-xz_SPECIAL_DEFS)
+
+include $(FILE_KBUILD_FOOTER)
+
Index: /trunk/tests/inherit-misc/sdk51a-xz.kmk
===================================================================
--- /trunk/tests/inherit-misc/sdk51a-xz.kmk	(revision 2007)
+++ /trunk/tests/inherit-misc/sdk51a-xz.kmk	(revision 2007)
@@ -0,0 +1,28 @@
+# $Id$
+## @file
+# Test - Misc Inheritance Issues.
+#
+
+#
+# Copyright (c) 2008 knut st. osmundsen <bird-src-spam@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#
+
+SDK_sdk51a-xz = for inherit-misc51a
+SDK_sdk51a-xz_SPECIAL_DEFS = z=42
