Rename is_unbundled_app_build and UNBUNDLED_APP_BUILD to TARGET_BUILD_APPS.
Change-Id: I79e6f60e009dad3a48709962347441e4ca0c337a
This commit is contained in:
@@ -342,6 +342,7 @@ $(info TARGET_PRODUCT=$(TARGET_PRODUCT))
|
|||||||
$(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
|
$(info TARGET_BUILD_VARIANT=$(TARGET_BUILD_VARIANT))
|
||||||
$(info TARGET_SIMULATOR=$(TARGET_SIMULATOR))
|
$(info TARGET_SIMULATOR=$(TARGET_SIMULATOR))
|
||||||
$(info TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE))
|
$(info TARGET_BUILD_TYPE=$(TARGET_BUILD_TYPE))
|
||||||
|
$(info TARGET_BUILD_APPS=$(TARGET_BUILD_APPS))
|
||||||
$(info TARGET_ARCH=$(TARGET_ARCH))
|
$(info TARGET_ARCH=$(TARGET_ARCH))
|
||||||
$(info HOST_ARCH=$(HOST_ARCH))
|
$(info HOST_ARCH=$(HOST_ARCH))
|
||||||
$(info HOST_OS=$(HOST_OS))
|
$(info HOST_OS=$(HOST_OS))
|
||||||
|
43
core/main.mk
43
core/main.mk
@@ -688,22 +688,31 @@ droidcore: files \
|
|||||||
|
|
||||||
# The actual files built by the droidcore target changes depending
|
# The actual files built by the droidcore target changes depending
|
||||||
# on the build variant.
|
# on the build variant.
|
||||||
.PHONY: droid tests
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
ifeq ($(strip $(is_unbundled_app_build)),true)
|
|
||||||
unbundled_build_modules :=
|
unbundled_build_modules :=
|
||||||
ifdef UNBUNDLED_APPS
|
ifneq ($(filter all,$(TARGET_BUILD_APPS)),)
|
||||||
unbundled_build_modules := $(UNBUNDLED_APPS)
|
# If they used the magic goal "all" then build everything
|
||||||
else # UNBUNDLED_APPS
|
|
||||||
# Otherwise we build all modules in the source tree.
|
|
||||||
unbundled_build_modules := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
|
unbundled_build_modules := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
|
||||||
endif # UNBUNDLED_APPS
|
else
|
||||||
droid: $(unbundled_build_modules)
|
unbundled_build_modules := $(TARGET_BUILD_APPS)
|
||||||
else # is_unbundled_app_build
|
endif
|
||||||
droid: droidcore
|
default_goal_deps := $(unbundled_build_modules)
|
||||||
endif # is_unbundled_app_build
|
else # TARGET_BUILD_APPS
|
||||||
|
default_goal_deps := droidcore
|
||||||
|
endif # TARGET_BUILD_APPS
|
||||||
|
|
||||||
|
.PHONY: droid tests
|
||||||
|
droid: $(default_goal_deps)
|
||||||
tests: droidcore
|
tests: droidcore
|
||||||
|
|
||||||
ifneq ($(strip $(is_unbundled_app_build)),true)
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
|
# dist the unbundled app.
|
||||||
|
$(call dist-for-goals,droid, \
|
||||||
|
$(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
else # TARGET_BUILD_APPS
|
||||||
|
|
||||||
$(call dist-for-goals, droid, \
|
$(call dist-for-goals, droid, \
|
||||||
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
|
$(INTERNAL_UPDATE_PACKAGE_TARGET) \
|
||||||
$(INTERNAL_OTA_PACKAGE_TARGET) \
|
$(INTERNAL_OTA_PACKAGE_TARGET) \
|
||||||
@@ -727,15 +736,7 @@ $(call dist-for-goals, droid, \
|
|||||||
$(BUILT_TESTS_ZIP_PACKAGE) \
|
$(BUILT_TESTS_ZIP_PACKAGE) \
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
endif # TARGET_BUILD_APPS
|
||||||
else # is_unbundled_app_build
|
|
||||||
# dist the unbundled app.
|
|
||||||
ifdef UNBUNDLED_APPS
|
|
||||||
$(call dist-for-goals,droid, \
|
|
||||||
$(foreach m,$(UNBUNDLED_APPS),$(ALL_MODULES.$(m).INSTALLED)) \
|
|
||||||
)
|
|
||||||
endif # UNBUNDLED_APPS
|
|
||||||
endif # is_unbundled_app_build
|
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: $(ALL_DOCS)
|
docs: $(ALL_DOCS)
|
||||||
|
@@ -311,7 +311,7 @@ PACKAGES.$(LOCAL_PACKAGE_NAME).CERTIFICATE := $(certificate)
|
|||||||
# Define the rule to build the actual package.
|
# Define the rule to build the actual package.
|
||||||
$(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN)
|
$(LOCAL_BUILT_MODULE): $(AAPT) | $(ZIPALIGN)
|
||||||
$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries)
|
$(LOCAL_BUILT_MODULE): PRIVATE_JNI_SHARED_LIBRARIES := $(jni_shared_libraries)
|
||||||
ifeq ($(strip $(is_unbundled_app_build)),true)
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
# Include all resources for unbundled apps.
|
# Include all resources for unbundled apps.
|
||||||
$(LOCAL_BUILT_MODULE): PRODUCT_AAPT_CONFIG :=
|
$(LOCAL_BUILT_MODULE): PRODUCT_AAPT_CONFIG :=
|
||||||
endif
|
endif
|
||||||
|
@@ -157,13 +157,12 @@ ifdef unbundled_goals
|
|||||||
ifneq ($(words $(unbundled_goals)),1)
|
ifneq ($(words $(unbundled_goals)),1)
|
||||||
$(error Only one APP-* goal may be specified; saw "$(unbundled_goals)"))
|
$(error Only one APP-* goal may be specified; saw "$(unbundled_goals)"))
|
||||||
endif
|
endif
|
||||||
UNBUNDLED_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals))))
|
TARGET_BUILD_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals))))
|
||||||
ifneq ($(filter $(DEFAULT_GOAL),$(MAKECMDGOALS)),)
|
ifneq ($(filter $(DEFAULT_GOAL),$(MAKECMDGOALS)),)
|
||||||
MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
|
MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
|
||||||
else
|
else
|
||||||
MAKECMDGOALS := $(patsubst $(unbundled_goals),$(DEFAULT_GOAL),$(MAKECMDGOALS))
|
MAKECMDGOALS := $(patsubst $(unbundled_goals),$(DEFAULT_GOAL),$(MAKECMDGOALS))
|
||||||
endif
|
endif
|
||||||
is_unbundled_app_build := true
|
|
||||||
|
|
||||||
.PHONY: $(unbundled_goals)
|
.PHONY: $(unbundled_goals)
|
||||||
$(unbundled_goals): $(MAKECMDGOALS)
|
$(unbundled_goals): $(MAKECMDGOALS)
|
||||||
@@ -178,7 +177,7 @@ include $(BUILD_SYSTEM)/node_fns.mk
|
|||||||
include $(BUILD_SYSTEM)/product.mk
|
include $(BUILD_SYSTEM)/product.mk
|
||||||
include $(BUILD_SYSTEM)/device.mk
|
include $(BUILD_SYSTEM)/device.mk
|
||||||
|
|
||||||
ifeq ($(strip $(is_unbundled_app_build)),true)
|
ifneq ($(strip $(TARGET_BUILD_APPS)),)
|
||||||
# An unbundled app build needs only the core product makefiles.
|
# An unbundled app build needs only the core product makefiles.
|
||||||
$(call import-products,$(call get-product-makefiles,\
|
$(call import-products,$(call get-product-makefiles,\
|
||||||
$(SRC_TARGET_DIR)/product/AndroidProducts.mk))
|
$(SRC_TARGET_DIR)/product/AndroidProducts.mk))
|
||||||
@@ -189,7 +188,7 @@ else
|
|||||||
#TODO: when we start allowing direct pointers to product files,
|
#TODO: when we start allowing direct pointers to product files,
|
||||||
# guarantee that they're in this list.
|
# guarantee that they're in this list.
|
||||||
$(call import-products, $(get-all-product-makefiles))
|
$(call import-products, $(get-all-product-makefiles))
|
||||||
endif # is_unbundled_app_build
|
endif # TARGET_BUILD_APPS
|
||||||
$(check-all-products)
|
$(check-all-products)
|
||||||
#$(dump-products)
|
#$(dump-products)
|
||||||
#$(error done)
|
#$(error done)
|
||||||
|
@@ -25,8 +25,8 @@
|
|||||||
# it includes.
|
# it includes.
|
||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(strip $(is_unbundled_app_build)),true)
|
|
||||||
# An unbundled app build needs only generic.mk.
|
# An unbundled app build needs only generic.mk.
|
||||||
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
PRODUCT_MAKEFILES := \
|
PRODUCT_MAKEFILES := \
|
||||||
$(LOCAL_DIR)/core.mk \
|
$(LOCAL_DIR)/core.mk \
|
||||||
$(LOCAL_DIR)/generic.mk
|
$(LOCAL_DIR)/generic.mk
|
||||||
|
@@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
LOCAL_PATH := $(my-dir)
|
LOCAL_PATH := $(my-dir)
|
||||||
|
|
||||||
ifeq ($(strip $(is_unbundled_app_build)),true)
|
# If we're building only unbundled apps, this is the only tool we need.
|
||||||
|
ifneq ($(TARGET_BUILD_APPS),)
|
||||||
include $(LOCAL_PATH)/signapk/Android.mk
|
include $(LOCAL_PATH)/signapk/Android.mk
|
||||||
else
|
else
|
||||||
include $(call first-makefiles-under,$(LOCAL_PATH))
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|
||||||
|
Reference in New Issue
Block a user