Add a tapas command.
(Actually there was a tapas command that just called choosecombo).
The new better tapas command is for building unbundled apps. Run
it with one or more modules to build and optionally a build variant.
tapas [variant] App1 App2 ...
If you don't supply a build variant, it defaults to eng.
Change-Id: I02214abd0b5ad02e364fcb024e10cf6ad17a9e68
diff --git a/core/main.mk b/core/main.mk
index 8cf21bc..ddd05bb 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -46,6 +46,7 @@
BUILD_SYSTEM := $(TOPDIR)build/core
# This is the default target. It must be the first declared target.
+.PHONY: droid
DEFAULT_GOAL := droid
$(DEFAULT_GOAL):
@@ -686,9 +687,9 @@
$(INSTALLED_USERDATAIMAGE_TARGET) \
$(INSTALLED_FILES_FILE)
-# The actual files built by the droidcore target changes depending
-# on the build variant.
ifneq ($(TARGET_BUILD_APPS),)
+ # If this build is just for apps, only build apps and not the full system by default.
+
unbundled_build_modules :=
ifneq ($(filter all,$(TARGET_BUILD_APPS)),)
# If they used the magic goal "all" then build everything
@@ -696,24 +697,19 @@
else
unbundled_build_modules := $(TARGET_BUILD_APPS)
endif
- default_goal_deps := $(unbundled_build_modules)
-else # TARGET_BUILD_APPS
- default_goal_deps := droidcore
-endif # TARGET_BUILD_APPS
-.PHONY: droid tests
-droid: $(default_goal_deps)
-tests: droidcore
-
-ifneq ($(TARGET_BUILD_APPS),)
# dist the unbundled app.
- $(call dist-for-goals,droid, \
+ $(call dist-for-goals,apps_only, \
$(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) \
)
-else # TARGET_BUILD_APPS
+.PHONY: apps_only
+apps_only: $(unbundled_build_modules)
- $(call dist-for-goals, droid, \
+droid: apps_only
+
+else # TARGET_BUILD_APPS
+ $(call dist-for-goals, droidcore, \
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
$(INTERNAL_OTA_PACKAGE_TARGET) \
$(SYMBOLS_ZIP) \
@@ -736,8 +732,16 @@
$(BUILT_TESTS_ZIP_PACKAGE) \
)
endif
+
+# Building a full system-- the default is to build droidcore
+droid: droidcore
+
endif # TARGET_BUILD_APPS
+
+.PHONY: droid tests
+tests: droidcore
+
.PHONY: docs
docs: $(ALL_DOCS)
@@ -782,3 +786,4 @@
.PHONY: showcommands
showcommands:
@echo >/dev/null
+