Index: trunk/kBuild/doc/Makefile.kmk
===================================================================
--- trunk/kBuild/doc/Makefile.kmk	(revision 2344)
+++ trunk/kBuild/doc/Makefile.kmk	(revision 2345)
@@ -1,2 +1,5 @@
+DEPTH = ../..
+include ../header.kmk
+
 TXTFILES = \
 	QuickReference-kmk.txt \
@@ -15,2 +18,46 @@
 $(foreach name, $(basename $(TXTFILES)), $(eval $(genrule)))
 
+
+#
+# For generating the basis for the target properties table.
+#
+my_tp.1 = BLDPROGS PROGRAMS
+my_tp.2 = LIBRARIES
+my_tp.3 = IMPORT_LIBS DLLS
+my_tp.4 = DLLS
+my_tp.5 = PROGRAMS
+my_tp.6 = SYSMODS
+my_tp.7 = MISCBINS
+my_tp.8 = INSTALLS
+my_tp.9 = FETCHES
+my_tp.a = OTHERS
+my_tp = 1 2 3 4 5 6 7 8 9 a
+tpc := $(translate $(my_tp),$(SP))
+
+define def_target_prop_rule
+target-properties::
+	@$$(PRINTF) '|%-2s| %-18s| %-6s|%$(expr 79-33)s|\n' "$(kind)" "``$(prop)``" "$(my_tmp_which)" ""
+	@$$(ECHO) '+--+-------------------+-------+----------------------------------------------+'
+endef
+define def_target_prop_doit
+my_tmp_which := $(foreach x,$(my_tp),$(if $(intersects \
+                     $(prop),\
+                     $(foreach nm,$(my_tp.$(x)),$(foreach suff,SINGLE DEFERRED ACCUMULATE_R ACCUMULATE_L,$(PROPS_$(nm)_$(suff)))))\
+                ,$(x),))
+my_tmp_which := $(translate $(my_tmp_which),$(SP))
+$(for local i = 1, $i < 10, local i := $(expr $i + 1),$(for local l = $(expr 10 - $i + 1), $l > 3, local l := $(expr $l - 1), \
+	$(eval my_tmp_which:=$(subst $(substr $(tpc), $i, $l),$i-$(substr $(tpc),$(expr $i + $l - 1),1),$(my_tmp_which)))\
+) )
+$(eval $(def_target_prop_rule))
+endef
+kind := S
+$(foreach prop,$(sort $(PROPS_SINGLE)),$(evalcall def_target_prop_doit))
+kind := D
+$(foreach prop,$(sort $(PROPS_DEFERRED)),$(evalcall def_target_prop_doit))
+kind := Ar
+$(foreach prop,$(sort $(PROPS_ACCUMULATE_R)),$(evalcall def_target_prop_doit))
+kind := Al
+$(foreach prop,$(sort $(PROPS_ACCUMULATE_L)),$(evalcall def_target_prop_doit))
+#kind := To
+#$(foreach prop,$(sort $(PROPS_TOOLS_ONLY)),$(evalcall def_target_prop_doit))
+
Index: trunk/kBuild/doc/QuickReference-kBuild.txt
===================================================================
--- trunk/kBuild/doc/QuickReference-kBuild.txt	(revision 2344)
+++ trunk/kBuild/doc/QuickReference-kBuild.txt	(revision 2345)
@@ -9,14 +9,14 @@
 --------------------------------
 
-A typical template::
+A typical makefile::
 
     # $Id$
     ## @file
-    # Makefile descriptions
-    #
-
-    #
-    # Copyright (c) year
-    # License and other legal stuff.
+    # Makefile description.
+    #
+
+    #
+    # Copyright (c) year name
+    # License, disclaimer and other legal text.
     #
 
@@ -25,5 +25,11 @@
 
     #
-    # Global variables (optional).
+    # Include sub-makefiles.
+    #
+    include $(PATH_CURRENT)/subdir1/Makefile.kmk
+    include $(PATH_CURRENT)/subdir2/Makefile.kmk
+
+    #
+    # Global variables.
     #
     MYPREFIX_SOMETHING = or another
@@ -58,40 +64,203 @@
     include $(FILE_KBUILD_SUB_FOOTER)
 
-    #
-    # More optional rules.
-    #
-
-That's it.
-
 
 Target lists
 ------------
 
-The table gives the target lists in the typical pass order.
-
-+----------------------+-------------------------------------------------------+
-| Name                 | Description                                           |
-+======================+=======================================================+
-| ``BLDPROGS``         | Build programs, targets the host platform.            |
-+----------------------+-------------------------------------------------------+
-| ``LIBRARIES``        | Libraries (not shared).                               |
-+----------------------+-------------------------------------------------------+
-| ``IMPORT_LIBS``      | Import libraries or stub shared libraries.            |
-+----------------------+-------------------------------------------------------+
-| ``DLL``              | DLLs, Shared Libraries, DYLIBs, etc.                  |
-+----------------------+-------------------------------------------------------+
-| ``PROGRAMS``         | Executable programs.                                  |
-+----------------------+-------------------------------------------------------+
-| ``SYSMODS``          | System modules (kexts, kernel modules, drivers, etc). |
-+----------------------+-------------------------------------------------------+
-| ``MISCBINS``         | Miscellanceous binaries like BIOS images and such.    |
-+----------------------+-------------------------------------------------------+
-| ``OTHERS``           | List of targets made during the others pass.          |
-+----------------------+-------------------------------------------------------+
-| ``INSTALLS``         | Things to install. [1]_                               |
-+----------------------+-------------------------------------------------------+
-| ``FETCHES``          | Things to fetch. [1]_                                 |
-+----------------------+-------------------------------------------------------+
-
++-+-------------------+-------------------------------------------------------+
+|#| Name              | Description                                           |
++=+===================+=======================================================+
+|1| ``BLDPROGS``      | Build programs, targets the host platform.            |
++-+-------------------+-------------------------------------------------------+
+|2| ``LIBRARIES``     | Libraries (not shared).                               |
++-+-------------------+-------------------------------------------------------+
+|3| ``IMPORT_LIBS``   | Import libraries or stub shared libraries.            |
++-+-------------------+-------------------------------------------------------+
+|4| ``DLLS``          | DLLs, Shared Libraries, DYLIBs, etc.                  |
++-+-------------------+-------------------------------------------------------+
+|5| ``PROGRAMS``      | Executable programs.                                  |
++-+-------------------+-------------------------------------------------------+
+|6| ``SYSMODS``       | System modules (kexts, kernel modules, drivers, etc). |
++-+-------------------+-------------------------------------------------------+
+|7| ``MISCBINS``      | Miscellanceous binaries like BIOS images and such.    |
++-+-------------------+-------------------------------------------------------+
+|8| ``INSTALLS``      | Things to install. [1]_                               |
++-+-------------------+-------------------------------------------------------+
+|9| ``FETCHES``       | Things to fetch. [1]_                                 |
++-+-------------------+-------------------------------------------------------+
+|a| ``OTHERS``        | List of targets made during the others pass.          |
++-+-------------------+-------------------------------------------------------+
+
+
+Target properties
+-----------------
+
+The first column indicates the kind of property, S=Single, D=Deferred,
+Ar=Accumlate-Right and Al=Accumulate-Left.
+
+The third column should be cross referenced with the first column in the
+target list table above.
+
++--+-------------------+-------+----------------------------------------------+
+|K | Name              | Which | Description                                  |
++==+===================+=======+==============================================+
+|S | ``ARLIBSUFF``     | 2     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``ARTOOL``        | 2     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``ASOBJSUFF``     | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``ASTOOL``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``BINSUFF``       | 7     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``BLD_TRG``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``BLD_TRG_ARCH``  | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``BLD_TRG_CPU``   | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``BLD_TYPE``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``COBJSUFF``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``CTOOL``         | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``CXXOBJSUFF``    | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``CXXTOOL``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``DLLSUFF``       | 34    |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``EXESUFF``       | 15    |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``FETCHDIR``      | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``FETCHTOOL``     | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``GID``           | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``INST``          | 1-9   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``LDTOOL``        | 13-7  |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``LIBSUFF``       | 234   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``MODE``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``NOINST``        | 1-8   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``OBJCOBJSUFF``   | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``OBJCTOOL``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``OBJSUFF``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``PATCHTOOL``     | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``RCOBJSUFF``     | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``RCTOOL``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``SYSSUFF``       | 6     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``TEMPLATE``      | 1-9   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``TOOL``          | 1-9   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``UID``           | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|S | ``UNPACKTOOL``    | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``INSTALLER``     | 1-8   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``INSTFUN``       | 1-8   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``NAME``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``POST_CMDS``     | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``PRE_CMDS``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|D | ``SONAME``        | 13-7  |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``ARFLAGS``       | 2     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``ASDEFS``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``ASFLAGS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``CDEFS``         | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``CFLAGS``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``CXXDEFS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``CXXFLAGS``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``DEFS``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``DEPS``          | 1-8   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``FETCHFLAGS``    | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``IDFLAGS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``IFDLAGS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``ISFLAGS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``LDFLAGS``       | 13-7  |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``LNK_DEPS``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``LNK_ORDERDEPS`` | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``OBJCDEFS``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``OBJCFLAGS``     | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``ORDERDEPS``     | 1-8   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``PATCHFLAGS``    | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``RCDEFS``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``RCFLAGS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Ar| ``UNPACKFLAGS``   | 9     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``ASINCS``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``BLDDIRS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``CINCS``         | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``CLEAN``         | 1-9   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``CXXINCS``       | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``DIRS``          | 8     |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``INCS``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``INTERMEDIATES`` | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``LIBPATH``       | 13-7  |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``LIBS``          | 13-7  |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``OBJCINCS``      | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``RCINCS``        | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``SDKS``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``SOURCES``       | 1-9   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``SRC_HANDLERS``  | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
+|Al| ``USES``          | 1-7   |                                              |
++--+-------------------+-------+----------------------------------------------+
 
 
@@ -105,2 +274,3 @@
 :Copyright: Copyright (c) 2009 knut st. osmundsen
 
+
