Support EMMA_INSTRUMENT in both full and unbundled builds.
Bug: 6987838
- With this change, use "EMMA_INSTRUMENT=true" to enable emma in full or
unbundled build.
- You don't need to add "LOCAL_STATIC_JAVA_LIBRARIES += emma" any more for
unbundled apps.
- Now a single var LOCAL_EMMA_INSTRUMENT replaces the previous
LOCAL_NO_EMMA_INSTRUMENT and LOCAL_NO_EMMA_COMPILE.
- By default, if EMMA_INSTRUMENT is true, emma is enabled for only
non-test apps.
- A new global var EMMA_INSTRUMENT_STATIC. It enables EMMA_INSTRUMENT
and builds emma into apk/jar as static library, instead of using emma
as part of shared library core.jar.
Change-Id: I0aa219e83074879ececc159b5b07c39eb07ccc00
diff --git a/core/main.mk b/core/main.mk
index def9f62..eda80ed 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -218,6 +218,11 @@
MAKECMDGOALS := $(filter-out incrementaljavac, $(MAKECMDGOALS))
endif
+# EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
+ifeq (true,$(EMMA_INSTRUMENT_STATIC))
+EMMA_INSTRUMENT := true
+endif
+
# Bring in standard build system definitions.
include $(BUILD_SYSTEM)/definitions.mk