Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd46b21c authored by Joe Onorato's avatar Joe Onorato Committed by The Android Open Source Project
Browse files

Automated import from //branches/donutburger/...@140982,140982

parent cd44e540
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
@@ -72,33 +72,38 @@ LOCAL_NO_EMMA_INSTRUMENT := true
LOCAL_NO_EMMA_COMPILE := true
endif

# Choose leaf name for the compiled jar file.
ifneq ($(LOCAL_NO_EMMA_COMPILE),true) 
full_classes_compiled_jar_leaf := classes-no-debug-var.jar
else
full_classes_compiled_jar_leaf := classes-full-debug.jar
endif

# Compile the java files to a .jar file.
# This intentionally depends on java_sources, not all_java_sources.
# Deps for generated source files must be handled separately,
# via deps on the target that generates the sources.
full_classes_compiled_jar := $(intermediates.COMMON)/$(full_classes_compiled_jar_leaf)
$(full_classes_compiled_jar): $(java_sources) $(full_java_lib_deps)
	$(transform-java-to-classes.jar)

ifneq ($(LOCAL_NO_EMMA_COMPILE),true) 
# If you instrument class files that have local variable debug information in
# them emma does not correctly maintain the local variable table.
# This will cause an error when you try to convert the class files for Android.
# The workaround for this to compile the java classes with only
# line and source debug information, not local information.
full_classes_compiled_name_jar := classes-no-debug-var.jar
$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g:{lines,source}
else
# when emma is off, compile with the default flags, which contain full debug 
# info
full_classes_compiled_name_jar := classes-full-debug.jar
$(full_classes_compiled_jar): PRIVATE_JAVAC_DEBUG_FLAGS := -g
endif

# Compile the java files to a .jar file.
# This intentionally depends on java_sources, not all_java_sources.
# Deps for generated source files must be handled separately,
# via deps on the target that generates the sources.
full_classes_compiled_jar := $(intermediates.COMMON)/$(full_classes_compiled_name_jar)
$(full_classes_compiled_jar): $(java_sources) $(full_java_lib_deps)
	$(transform-java-to-classes.jar)

emma_intermediates_dir := $(intermediates.COMMON)/emma_out
# the 'lib/$(full_classes_compiled_name_jar)' portion of this path is fixed in 
# the 'lib/$(full_classes_compiled_jar_leaf)' portion of this path is fixed in 
# the emma tool
full_classes_emma_jar := $(emma_intermediates_dir)/lib/$(full_classes_compiled_name_jar)
full_classes_emma_jar := $(emma_intermediates_dir)/lib/$(full_classes_compiled_jar_leaf)

ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
# Skip adding emma instrumentation to class files if this is a static library,