make/common/NativeCompilation.gmk
changeset 25854 98ce0879ab4c
parent 23433 afe67de12b7d
child 25882 bd4315f0084b
--- a/make/common/NativeCompilation.gmk	Sun Aug 10 19:38:50 2014 -0700
+++ b/make/common/NativeCompilation.gmk	Sun Aug 17 15:51:37 2014 +0100
@@ -27,6 +27,9 @@
 # of removing duplicates. It is actually this side effect that is
 # desired whenever sort is used below!
 
+ifndef _NATIVE_COMPILATION_GMK
+_NATIVE_COMPILATION_GMK := 1
+
 ifeq (,$(_MAKEBASE_GMK))
   $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
 endif
@@ -284,7 +287,8 @@
     $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
   endif
   ifneq ($$($1_EXCLUDES),)
-    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+    $1_SRC_EXCLUDES := $$(addsuffix /%,$$($1_EXCLUDES))
+    $1_SRC_EXCLUDES += $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
     $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   endif
 
@@ -549,3 +553,5 @@
 
   endif
 endef
+
+endif # _NATIVE_COMPILATION_GMK