-include $(TMP_DIR)/.packagedeps
$(curdir)/builddirs:=$(sort $(package-) $(package-y) $(package-m))
-$(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
-$(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
-$(curdir)/builddirs-install:=. $(sort $(package-y))
+ifeq ($(SDK),1)
+ $(curdir)/builddirs-install:=.
+else
+ $(curdir)/builddirs-default:=. $(sort $(package-y) $(package-m))
+ $(curdir)/builddirs-prereq:=. $(sort $(prereq-y) $(prereq-m))
+ $(curdir)/builddirs-install:=. $(sort $(package-y))
+endif
+ifneq ($(IGNORE_ERRORS),)
+ $(curdir)/builddirs-ignore-compile:= $(if $(filter m y, $(IGNORE_ERRORS)),$(foreach m,$(IGNORE_ERRORS),$(package-$(m))),$(package-m))
+endif
$(curdir)/install:=$(curdir)/install-cleanup