add a flag "IGNORE_ERRORS", which can be used to ignore build errors in packages
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 7 May 2008 16:45:00 +0000 (16:45 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Wed, 7 May 2008 16:45:00 +0000 (16:45 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11059 3c298f89-4303-0410-b956-a3cf2f4a3e73

include/subdir.mk
include/verbose.mk
package/Makefile

index d62df7efa77571b64ce7e330bee88501b732a0e5..3097ea418dea169fa59c53273b400a59e925a060 100644 (file)
@@ -28,7 +28,8 @@ define subdir
     $(call warn,$(1),d,BD $(1)/$(bd))
     $(foreach target,$(SUBTARGETS),
       $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
-               +$$(MAKE) -j1 -C $(1)/$(bd) $(target)
+               +$$(MAKE) -j1 -C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE,   ERROR: $(1)/$(bd) failed to build.))
+
         $$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target))
 
       # legacy targets
index 36e59904ecff5fee634ad82e36104d80f61d6162..fed83d6fb6f69081081c40daf0f1d8fb555ed6e6 100644 (file)
@@ -25,11 +25,11 @@ ifeq ($(IS_TTY),1)
   _N:=\\033[m
 endif
 
-define MESSAGE
+ifneq ($(KBUILD_VERBOSE),99)
+  define MESSAGE
        printf "$(_Y)%s$(_N)\n" "$(1)" >&3
-endef
+  endef
 
-ifneq ($(KBUILD_VERBOSE),99)
   ifeq ($(QUIET),1)
     ifneq ($(CURDIR),$(TOPDIR))
       _DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
@@ -48,4 +48,8 @@ ifneq ($(KBUILD_VERBOSE),99)
   endif
 
   .SILENT: $(MAKECMDGOALS)
+else
+  define MESSAGE
+    printf "%s\n" "$(1)"
+  endef
 endif
index e618a90b698795d53a5d1b87cccf6b084cbb7d86..a1f20b0b1633ddd119d440b8844b3cd06c72633b 100644 (file)
@@ -17,6 +17,9 @@ else
   $(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