Support to build emmap_mata.zip in unbundled builds.

Bug: 6987838
Change-Id: Id6c81b08c4859442b7d52054ed5f278575719d1a
This commit is contained in:
Ying Wang 2012-08-15 12:22:44 -07:00
parent a8352cac8d
commit bc415dd5eb
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