Index: /trunk/kBuild/footer-pass1.kmk
===================================================================
--- /trunk/kBuild/footer-pass1.kmk	(revision 2763)
+++ /trunk/kBuild/footer-pass1.kmk	(revision 2764)
@@ -108,11 +108,7 @@
  endif
 endif
-ifn1of ($(insttype), none both stage)
- $(error kBuild: Unknown value '$(insttype)' for '$(target)_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.)
-endif
 $(target)_1_INSTTYPE := $(insttype)
 
-if1of ($(insttype), stage both)
- local inst := $(strip $(firstdefined \
+local inst := $(strip $(firstdefined \
 	$(target)_INST.$(bld_trg).$(bld_trg_arch).$(bld_type) \
 	$(target)_INST.$(bld_trg).$(bld_trg_arch) \
@@ -125,5 +121,5 @@
 	definst \
 	,value))
- local stage := $(strip $(firstdefined \
+local stage := $(strip $(firstdefined \
 	$(target)_STAGE.$(bld_trg).$(bld_trg_arch).$(bld_type) \
 	$(target)_STAGE.$(bld_trg).$(bld_trg_arch) \
@@ -136,4 +132,5 @@
 	inst \
 	,value))
+if1of ($(insttype), stage both)
  $(target)_1_STAGE := $(stage)
  if "$(substr $(stage),-1,1)" == "/" # Multicast support requires addprefix/suffix.
@@ -144,9 +141,9 @@
   $(target)_1_STAGE_TARGET := $(addprefix $(PATH_STAGE)/,$(stage))
  endif
-else
- local inst :=
- local stage :=
+else if1of ($(insttype), none)
  $(target)_1_STAGE :=
  $(target)_1_STAGE_TARGET :=
+else
+ $(error kBuild: Unknown value '$(insttype)' for '$(target)_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.)
 endif
 INSTARGET_$(target) := $($(target)_1_STAGE_TARGET)
@@ -177,7 +174,4 @@
 	$($(target)_DEBUG_INSTTYPE) \
 	$(insttype) )
-ifn1of ($(debug_insttype), none both stage)
- $(error kBuild: Unknown value '$(debug_insttype)' for '$(target)_DEBUG_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.)
-endif
 $(target)_1_DEBUG_INSTTYPE := $(debug_insttype)
 
@@ -208,6 +202,8 @@
   $(target)_1_DEBUG_STAGE := ./
  endif
-else
+else if1of ($(debug_insttype), none)
  $(target)_1_DEBUG_STAGE :=
+else
+ $(error kBuild: Unknown value '$(debug_insttype)' for '$(target)_DEBUG_INSTTYPE'. Valid values are 'none', 'both' and 'stage'.)
 endif
 
