am c955834a: am c048c9b5: default empty tapas to TARGET_BUILD_APPS "all"

Merge commit 'c955834ad0715343a2245142be416f92b83e8306' into gingerbread-plus-aosp

* commit 'c955834ad0715343a2245142be416f92b83e8306':
  default empty tapas to TARGET_BUILD_APPS "all"
diff --git a/core/main.mk b/core/main.mk
index 920548d..2d62b66 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -688,8 +688,8 @@
 
   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
diff --git a/envsetup.sh b/envsetup.sh
index b2415e0..d794281 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -559,6 +559,9 @@
     if [ -z "$variant" ]; then
         variant=eng
     fi
+    if [ -z "$apps" ]; then
+        apps=all
+    fi
 
     export TARGET_PRODUCT=generic
     export TARGET_BUILD_VARIANT=$variant