build: fix IGNORE_ERRORS for sources packages that match both 'y' and 'm'
authorFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jul 2013 16:44:44 +0000 (16:44 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Jul 2013 16:44:44 +0000 (16:44 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37405

package/Makefile

index df7cf79f2ec736e9315d13b08496adc5e35d7469..f8002348b12300448fcb2db48a141d640865acdf 100644 (file)
@@ -16,7 +16,12 @@ else
   $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
 endif
 ifneq ($(IGNORE_ERRORS),)
-  $(curdir)/builddirs-ignore-compile:= $(if $(filter n m y, $(IGNORE_ERRORS)),$(foreach m,$(IGNORE_ERRORS),$(package-$(subst n,,$(m)))),$(package-m) $(package-))
+  package-y-filter := $(package-y)
+  package-m-filter := $(filter-out $(package-y),$(package-m))
+  package-n-filter := $(filter-out $(package-y) $(package-m),$(package-))
+  package-ignore-errors := $(filter n m y,$(IGNORE_ERRORS))
+  package-ignore-errors := $(if $(package-ignore-errors),$(package-ignore-errors),n m)
+  $(curdir)/builddirs-ignore-compile := $(foreach m,$(package-ignore-errors),$(package-$(m)-filter))
 endif
 
 ifdef CONFIG_USE_MKLIBS