Merge "Support to build emmap_mata.zip in unbundled builds."

This commit is contained in:
Ying Wang 2012-08-15 15:55:19 -07:00 committed by Android (Google) Code Review
commit 4ec08ee20b
2 changed files with 19 additions and 8 deletions

View File

@ -1287,12 +1287,16 @@ $(APPS_ZIP): $(INSTALLED_SYSTEMIMAGE)
# A zip of emma code coverage meta files. Generated for fully emma
# instrumented build.
#
ifeq (true,$(EMMA_INSTRUMENT))
EMMA_META_ZIP := $(PRODUCT_OUT)/emma_meta.zip
$(EMMA_META_ZIP): $(INSTALLED_SYSTEMIMAGE)
# the dependency will be set up later in build/core/main.mk.
$(EMMA_META_ZIP) :
@echo "Collecting Emma coverage meta files."
$(hide) find $(TARGET_COMMON_OUT_ROOT) -name "coverage.em" | \
zip -@ -q $@
endif # EMMA_INSTRUMENT=true
# -----------------------------------------------------------------
# dalvik something
.PHONY: dalvikfiles

View File

@ -780,10 +780,6 @@ droidcore: files \
# dist_files only for putting your library into the dist directory with a full build.
.PHONY: dist_files
ifeq ($(EMMA_INSTRUMENT),true)
$(call dist-for-goals, dist_files, $(EMMA_META_ZIP))
endif
# Dist for droid if droid is among the cmd goals, or no cmd goal is given.
ifneq ($(filter droid,$(MAKECMDGOALS))$(filter ||,|$(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))|),)
@ -798,10 +794,15 @@ ifneq ($(TARGET_BUILD_APPS),)
unbundled_build_modules := $(TARGET_BUILD_APPS)
endif
apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED))
# dist the unbundled app.
$(call dist-for-goals,apps_only, \
$(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) \
)
$(call dist-for-goals,apps_only, $(apps_only_installed_files))
ifeq ($(EMMA_INSTRUMENT),true)
$(EMMA_META_ZIP) : $(apps_only_installed_files)
$(call dist-for-goals,apps_only, $(EMMA_META_ZIP))
endif
.PHONY: apps_only
apps_only: $(unbundled_build_modules)
@ -830,6 +831,12 @@ else # TARGET_BUILD_APPS
)
endif
ifeq ($(EMMA_INSTRUMENT),true)
$(EMMA_META_ZIP) : $(INSTALLED_SYSTEMIMAGE)
$(call dist-for-goals, dist_files, $(EMMA_META_ZIP))
endif
# Building a full system-- the default is to build droidcore
droid: droidcore dist_files