OSDN Git Service

Make the module existence check nonfatal
authorYing Wang <wangying@google.com>
Fri, 14 Feb 2014 21:39:42 +0000 (13:39 -0800)
committerYing Wang <wangying@google.com>
Fri, 14 Feb 2014 21:39:42 +0000 (13:39 -0800)
Now we have sdk variants that may inherit the non-existent module names
from the device product.

Change-Id: Ibe96a33cde650fd79ae4731561dcb674203c3b91

core/main.mk

index e2b93c2..5d46c98 100644 (file)
@@ -696,9 +696,13 @@ ifdef is_sdk_build
 
   # Ensure every module listed in PRODUCT_PACKAGES* gets something installed
   # TODO: Should we do this for all builds and not just the sdk?
+  dangling_modules :=
   $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES), \
     $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
-      $(error $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES has nothing to install!)))
+      $(eval dangling_modules += $(m))))
+  ifneq ($(dangling_modules),)
+    $(warning: Modules '$(dangling_modules)' in PRODUCT_PACKAGES has nothing to install!)
+  endif
   $(foreach m, $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGES_DEBUG), \
     $(if $(strip $(ALL_MODULES.$(m).INSTALLED)),,\
       $(warning $(ALL_MODULES.$(m).MAKEFILE): Module '$(m)' in PRODUCT_PACKAGES_DEBUG has nothing to install!)))