Index: trunk/Config.kmk
===================================================================
--- trunk/Config.kmk	(revision 6241)
+++ trunk/Config.kmk	(revision 6242)
@@ -372,5 +372,5 @@
 #
 VBOX_BUILD_TYPES ?= release profile debug kprofile #todo: checked
-ifneq ($(filter-out $(VBOX_BUILD_TYPES),$(BUILD_TYPE)),)
+ifn1of ($(BUILD_TYPE), $(VBOX_BUILD_TYPES))
  $(error Invalid BUILD_TYPE value '$(BUILD_TYPE)'. Choose one these: $(VBOX_BUILD_TYPES))
 endif
@@ -459,5 +459,5 @@
 # Image and object format config.
 #
-ifeq ($(filter-out linux l4 freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), linux l4 freebsd netbsd openbsd solaris)
  VBOX_LDR_FMT = elf
 endif
@@ -781,5 +781,5 @@
 # Add the output dir(s) to the dynamic loader search path.
 #
-ifeq ($(filter-out linux l4 freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), linux l4 freebsd netbsd openbsd solaris)
  export LD_LIBRARY_PATH:=$(PATH_BIN):$(PATH_LIB):$(LD_LIBRARY_PATH)
 endif
@@ -812,5 +812,5 @@
  LIB_XPCOM       = $(PATH_BIN)/VBoxXPCOM.s.so
 endif
-ifeq ($(filter-out linux freebsd netbsd openbsd solaris,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), linux freebsd netbsd openbsd solaris)
  LIB_RUNTIME     = $(PATH_BIN)/VBoxRT.so
  LIB_RUNTIME_EF  = $(PATH_LIB)/RuntimeEFCPP.a
@@ -915,5 +915,5 @@
 # We need to export YASM for OSE, but since it was converted to .zip we need to
 # allow for the location used by the zip to be properly cleaned up first.
-ifeq ($(filter-out win.x86 linux.x86 solaris.x86, $(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)),)
+if1of ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),  win.x86 linux.x86 solaris.x86)
  PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
 endif
@@ -1151,5 +1151,5 @@
 #
 VBOX_PREF_LIB =
-ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET),win os2)
 VBOX_SUFF_LIB = .lib
 else
@@ -1190,5 +1190,5 @@
 
 SDK_VBOX_ZLIB         = .
-ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), win os2)
  SDK_VBOX_ZLIB_INCS  ?= $(PATH_ROOT)/src/libs/zlib-1.2.1
  SDK_VBOX_ZLIB_LIBS  ?= $(PATH_LIB)/VBox-zlib$(VBOX_SUFF_LIB)
@@ -1203,5 +1203,5 @@
 
 SDK_VBOX_FFMPEG       = .
-ifeq ($(filter-out win os2 darwin,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), win os2 darwin)
  SDK_VBOX_FFMPEG_INCS ?= \
 	$(PATH_ROOT)/src/libs/ffmpeg-20060710/libavutil \
@@ -1316,5 +1316,5 @@
 # The linux kernel headers(/sources).
 #
-ifneq ($(filter linux,$(BUILD_TARGET)),)
+if1of ($(BUILD_TARGET), linux)
  ifeq ($(origin VBOX_LINUX_SRC),undefined)
   ifneq ($(wildcard /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h),)
@@ -1386,6 +1386,6 @@
  TEMPLATE_VBOXGC_LDFLAGS.release    = $(if $(VBOX_DO_STRIP_MODULES),-S,)
 endif
-ifneq ($(filter-out solaris freebsd,$(BUILD_TARGET)),)
-TEMPLATE_VBOXGC_LIBS                = \
+ifn1of ($(BUILD_TARGET), solaris freebsd)
+ TEMPLATE_VBOXGC_LIBS               = \
 	$(VBOX_GCC32_LIBGCC) # instricts
 endif
@@ -1489,6 +1489,5 @@
  TEMPLATE_VBOXR0_LDFLAGS.release     = $(if $(VBOX_DO_STRIP_MODULES),-S,)
 endif
-
-ifneq ($(filter-out solaris freebsd,$(BUILD_TARGET)),)
+ifn1of ($(BUILD_TARGET),solaris freebsd)
  TEMPLATE_VBOXR0_LIBS                = \
 	$(VBOX_GCC_LIBGCC) # instricts
@@ -1792,5 +1791,5 @@
 TEMPLATE_VBOXR3EXE_LDFLAGS             = -read_only_relocs suppress
 TEMPLATE_VBOXR3EXE_INCS               += $(VBOX_PATH_MACOSX_SDK_INCS)
- else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_TARGET)),)
+ else if1of ($(BUILD_TARGET),freebsd netbsd openbsd)
 TEMPLATE_VBOXR3EXE_TOOL                = GXX3
 TEMPLATE_VBOXR3EXE_LIBS                = pthread
@@ -1945,5 +1944,5 @@
  else # x86:
   TEMPLATE_VBOXNOCRTGCC_LDFLAGS         = -nostdlib
-  ifneq ($(filter-out os2 darwin solaris,$(BUILD_TARGET)),)
+  ifn1of ($(BUILD_TARGET), os2 darwin solaris)
    TEMPLATE_VBOXNOCRTGCC_LDFLAGS       += -Wl,--no-undefined
   endif
@@ -2042,5 +2041,5 @@
 TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
 TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin      = -bind_at_load -framework Carbon
- else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_TARGET)),)
+ else if1of ($(BUILD_TARGET), freebsd netbsd openbsd)
 TEMPLATE_VBOXMAINEXE_TOOL                = GXX3
 TEMPLATE_VBOXMAINEXE_LIBS                = $(LIB_RUNTIME)
@@ -2352,5 +2351,5 @@
 TEMPLATE_VBOXBLDPROG_LIBS                =
 TEMPLATE_VBOXBLDPROG_INCS               += $(VBOX_PATH_MACOSX_SDK_INCS)
- else ifeq ($(filter-out freebsd netbsd openbsd,$(BUILD_PLATFORM)),)
+ else if1of ($(BUILD_PLATFORM), freebsd netbsd openbsd)
 TEMPLATE_VBOXBLDPROG_TOOL                = GXX3
 TEMPLATE_VBOXBLDPROG_LIBS                =
@@ -2760,8 +2759,9 @@
 
 ifndef VBOX_OSE
-ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # linux only, yea, right.
+if1of ($(BUILD_TARGET),freebsd linux netbsd openbsd solaris)
 VBOX_LICENSE_SRC := $(PATH_ROOT)/doc/License.html
 ## @todo this can be done by sed alone. Why do we have to do this $(shell ) stuff in *all* make
 # files btw? If this is really necessary, then just do it once for <insert deity of choice>'s sake.
+# Who-ever added this, please fix!
 VBOX_LICENSE_VER := $(shell grep Version $(VBOX_LICENSE_SRC)|sed -e 's/.*Version \([0-9.]*\),.*/\1/g')
 VBOX_LICENSE_BIN := $(PATH_BIN)/License-$(VBOX_LICENSE_VER).html
