Index: /trunk/kBuild/footer-pass2-compiling-targets.kmk
===================================================================
--- /trunk/kBuild/footer-pass2-compiling-targets.kmk	(revision 2530)
+++ /trunk/kBuild/footer-pass2-compiling-targets.kmk	(revision 2531)
@@ -134,4 +134,5 @@
 # @param    $($(target)_CMDS_PREV_) The link commands from the previous run.
 define def_link_rule
+$$(call KB_FN_ASSERT_ABSPATH,out)
 ifndef NO_LINK_CMDS_DEPS
 $(out): .MUST_MAKE = $$(comp-cmds-ex $$($(target)_CMDS_PREV_),$$(commands $$@),FORCE)
@@ -170,4 +171,5 @@
 #                      pre_install_cmds, post_install_cmds
 define def_link_install_rule
+$$(call KB_FN_ASSERT_ABSPATH,$(target)_1_INST_TARGET)
 $($(target)_1_INST_TARGET): $(out) | $$$$(dir $$$$@)
 	%$$(call MSG_INST_TRG,$(target),$(out),$$@)
@@ -184,4 +186,5 @@
 #                      pre_install_cmds, post_install_cmds
 define def_link_stage_rule
+$$(call KB_FN_ASSERT_ABSPATH,$(target)_1_STAGE_TARGET)
 $($(target)_1_STAGE_TARGET): $(out) | $$$$(dir $$$$@)
 	%$$(call MSG_INST_TRG,$(target),$(out),$$@)
@@ -388,4 +391,5 @@
 define def_link_install_debug_dir_rule
 local dir := $(debug_inst_path)/$(debug_inst)$(debug_dir)
+$$(call KB_FN_ASSERT_ABSPATH,dir)
 $$(dir): | $$$$(dir $$$$(patsubst %/,%,$$$$@))
 	%$$(call MSG_INST_DIR,$$@)
@@ -395,9 +399,12 @@
 
 ##
-# Install a debug file. 
+# Install a debug file.
 # @param    debug_file          Src=>Dst file pair.
 define def_link_install_debug_file_rule
 local dst := $(debug_inst_path)/$(debug_inst)$(word 2, $(subst =>,$(SP),$(debug_file)))
-$$(dst): $(word 1, $(subst =>,$(SP),$(debug_file))) | $$$$(dir $$$$@)
+$$(call KB_FN_ASSERT_ABSPATH,dst)
+local src := $(word 1, $(subst =>,$(SP),$(debug_file)))
+$$(call KB_FN_ASSERT_ABSPATH,src)
+$$(dst): $$(src) | $$$$(dir $$$$@)
 	%$$(call MSG_INST_FILE,$$@,$$<)
 	$$(QUIET)$(debug_install_cmd) $(if $(mode),-m $(mode)) $(if $(uid),-o $(uid)) $(if $(gid),-g $(gid)) -- $$< $$@
@@ -406,10 +413,10 @@
 
 ##
-# Install debug info to $(debug_inst), where debug_inst can be a directory or 
+# Install debug info to $(debug_inst), where debug_inst can be a directory or
 # file (just like $(inst) and $(stage).  Used for both staging and installing.
 define def_target_install_only_debug
 if "$(substr $(debug_inst),-1,1)" == "/"
  if "$(debug_inst)" == "./"
-  local debug_inst := 
+  local debug_inst :=
  endif
  local debug_dirs  := $(patsubst $($(target)_0_OUTDIR)/%,%,$($(target)_2_OUTPUT_DEBUG_DIRS))
Index: /trunk/kBuild/footer-pass2-installs.kmk
===================================================================
--- /trunk/kBuild/footer-pass2-installs.kmk	(revision 2530)
+++ /trunk/kBuild/footer-pass2-installs.kmk	(revision 2531)
@@ -41,4 +41,6 @@
 #
 define def_install_src_rule_staging
+$$(call KB_FN_ASSERT_ABSPATH, stagedst)
+$$(call KB_FN_ASSERT_ABSPATH, srcsrc)
 $(stagedst) : $(srcsrc) | $(dir $(stagedst))
 	%$$(call MSG_INST_FILE,$(srcsrc),$(stagedst))
@@ -48,4 +50,6 @@
 
 define def_install_src_rule_installing
+$$(call KB_FN_ASSERT_ABSPATH, instdst)
+$$(call KB_FN_ASSERT_ABSPATH, srcsrc)
 $(instdst) : $(srcsrc) | $(dir $(instdst))
 	%$$(call MSG_INST_FILE,$(srcsrc),$(instdst))
@@ -72,4 +76,7 @@
 local srcsrc    := $(firstword $(srcdst))
 local srcdstdir := $(dir $(word 2,$(srcdst)))
+ifeq ($(srcdstdir),./)
+ local srcdstdir:=
+endif
 local srcdst    := $(word $(words $(srcdst)),$(srcdst))
 
@@ -234,4 +241,5 @@
 #
 define def_install_symlink_rule_staging
+$$(call KB_FN_ASSERT_ABSPATH, stagedst)
 $(stagedst) : | $(dir $(stagedst))
 	%$$(call MSG_INST_SYM,$(stagedst),$(symdst))
@@ -242,4 +250,5 @@
 
 define def_install_symlink_rule_installing
+$$(call KB_FN_ASSERT_ABSPATH, instdst)
 $(instdst) : | $(dir $(instdst))
 	%$$(call MSG_INST_SYM,$(instdst),$(symdst))
@@ -319,5 +328,5 @@
 #
 define def_install_directory_rule
-# the install rule
+$$(call KB_FN_ASSERT_ABSPATH, insdst)
 $(insdst):
 	%$$(call MSG_INST_DIR,$(insdst))
Index: /trunk/kBuild/header.kmk
===================================================================
--- /trunk/kBuild/header.kmk	(revision 2530)
+++ /trunk/kBuild/header.kmk	(revision 2531)
@@ -847,4 +847,16 @@
 else
  KB_FN_ASSIGN_DEPRECATED = $(eval $(subst :,$$(COLON),$1) = $2$$(warning $1 is deprecated, use $3 instead))
+endif
+
+##
+# Throw an error if the given path $1 isn't absolute and assertions are enabled.
+#
+# @param   $1   The name of the path variable to check.
+#
+ifdef KBUILD_INTERNAL_STRICT
+ KB_FN_ASSERT_ABSPATH = $(if-expr "$(abspath $($(strip $1)))" != "$(strip $($(strip $1)))",\
+ 	$(error kBuild abspath assertion failed: target=$(target) $1=$($(strip $1))))
+else
+ KB_FN_ASSERT_ABSPATH :=
 endif
 
