From c048c9b598b36dc7506a954cc0d3d80f308b1b13 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Thu, 24 Jun 2010 15:08:33 -0700 Subject: [PATCH] default empty tapas to TARGET_BUILD_APPS "all" So that "tapas" without argument won't end in makefile-could-not-load error in unbundled branch. Also, the magic "all" apps will build only apps, not other things. Change-Id: Iac6dd928ee4e42996147acdab31930cd4ffa1768 --- core/base_rules.mk | 2 ++ core/main.mk | 5 ++--- envsetup.sh | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index 3f343e225..0d17c8382 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -491,6 +491,8 @@ ALL_MODULES += $(LOCAL_MODULE) # Don't use += on subvars, or else they'll end up being # recursively expanded. +ALL_MODULES.$(LOCAL_MODULE).CLASS := \ + $(ALL_MODULES.$(LOCAL_MODULE).CLASS) $(LOCAL_MODULE_CLASS) ALL_MODULES.$(LOCAL_MODULE).PATH := \ $(ALL_MODULES.$(LOCAL_MODULE).PATH) $(LOCAL_PATH) ALL_MODULES.$(LOCAL_MODULE).TAGS := \ diff --git a/core/main.mk b/core/main.mk index ddd05bb8e..ae7abb62e 100644 --- a/core/main.mk +++ b/core/main.mk @@ -692,8 +692,8 @@ ifneq ($(TARGET_BUILD_APPS),) unbundled_build_modules := ifneq ($(filter all,$(TARGET_BUILD_APPS)),) - # If they used the magic goal "all" then build everything - unbundled_build_modules := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS))) + # If they used the magic goal "all" then build all apps in the source tree. + unbundled_build_modules := $(foreach m,$(sort $(ALL_MODULES)),$(if $(filter APPS,$(ALL_MODULES.$(m).CLASS)),$(m))) else unbundled_build_modules := $(TARGET_BUILD_APPS) endif @@ -786,4 +786,3 @@ modules: .PHONY: showcommands showcommands: @echo >/dev/null - diff --git a/envsetup.sh b/envsetup.sh index f4dfc557a..21a66c13e 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -546,6 +546,9 @@ function tapas() if [ -z "$variant" ]; then variant=eng fi + if [ -z "$apps" ]; then + apps=all + fi export TARGET_PRODUCT=generic export TARGET_BUILD_VARIANT=$variant