Cleaned the outdated incrementaljavac.
Nobody is using this feature and now we switched to jack. Change-Id: I749b486eb347cbf3ee7b107565fc800eeb238c44
This commit is contained in:
parent
d508778493
commit
90598cb70c
2 changed files with 1 additions and 87 deletions
|
@ -1671,12 +1671,6 @@ else
|
||||||
xlint_unchecked := -Xlint:unchecked
|
xlint_unchecked := -Xlint:unchecked
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (true, $(ENABLE_INCREMENTALJAVAC))
|
|
||||||
incremental_dex := --incremental
|
|
||||||
else
|
|
||||||
incremental_dex :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
# emit-line, <word list>, <output file>
|
# emit-line, <word list>, <output file>
|
||||||
define emit-line
|
define emit-line
|
||||||
$(if $(1),echo -n '$(strip $(1)) ' >> $(2))
|
$(if $(1),echo -n '$(strip $(1)) ' >> $(2))
|
||||||
|
@ -1936,69 +1930,6 @@ $(if $(PRIVATE_JAR_EXCLUDE_PACKAGES), $(hide) echo unsupported options JAR_EXCLU
|
||||||
$(if $(PRIVATE_JAR_MANIFEST), $(hide) echo unsupported options JAR_MANIFEST in $@; exit 53)
|
$(if $(PRIVATE_JAR_MANIFEST), $(hide) echo unsupported options JAR_MANIFEST in $@; exit 53)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Override the above definitions if we want to do incremetal javac
|
|
||||||
ifeq (true, $(ENABLE_INCREMENTALJAVAC))
|
|
||||||
define compile-java
|
|
||||||
$(hide) mkdir -p $(dir $@)
|
|
||||||
$(hide) mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR)
|
|
||||||
$(hide) touch $(PRIVATE_CLASS_INTERMEDIATES_DIR)/newstamp
|
|
||||||
$(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES),$(PRIVATE_CLASS_INTERMEDIATES_DIR))
|
|
||||||
$(hide) if [ -e $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp ] ; then \
|
|
||||||
newerFlag=$$(echo -n "-newer $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp") ; \
|
|
||||||
fi ; \
|
|
||||||
find $(PRIVATE_JAVA_SOURCES) $$newerFlag > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list ; \
|
|
||||||
if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \
|
|
||||||
find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' $$newerFlag >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \
|
|
||||||
fi
|
|
||||||
$(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \
|
|
||||||
| sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
|
|
||||||
@echo "(Incremental) build source files:"
|
|
||||||
@cat $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
|
|
||||||
$(hide) if [ -s $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq ] ; then \
|
|
||||||
$(1) -encoding UTF-8 \
|
|
||||||
$(strip $(PRIVATE_JAVAC_DEBUG_FLAGS)) \
|
|
||||||
$(if $(findstring true,$(PRIVATE_WARNINGS_ENABLE)),$(xlint_unchecked),) \
|
|
||||||
$(2) \
|
|
||||||
$(addprefix -classpath ,$(strip \
|
|
||||||
$(call normalize-path-list,$(PRIVATE_ALL_JAVA_LIBRARIES) $(PRIVATE_CLASS_INTERMEDIATES_DIR)))) \
|
|
||||||
$(if $(findstring true,$(PRIVATE_WARNINGS_ENABLE)),$(xlint_unchecked),) \
|
|
||||||
-extdirs "" -d $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
|
|
||||||
$(PRIVATE_JAVACFLAGS) \
|
|
||||||
\@$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq \
|
|
||||||
|| ( exit 41 ) \
|
|
||||||
fi
|
|
||||||
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list
|
|
||||||
$(hide) rm -f $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq
|
|
||||||
$(hide) rm -f $@
|
|
||||||
$(if $(PRIVATE_JAR_EXCLUDE_FILES), $(hide) find $(PRIVATE_CLASS_INTERMEDIATES_DIR) \
|
|
||||||
-name $(word 1, $(PRIVATE_JAR_EXCLUDE_FILES)) \
|
|
||||||
$(addprefix -o -name , $(wordlist 2, 999, $(PRIVATE_JAR_EXCLUDE_FILES))) \
|
|
||||||
| xargs rm -rf)
|
|
||||||
$(if $(PRIVATE_JAR_PACKAGES), \
|
|
||||||
$(hide) find $(PRIVATE_CLASS_INTERMEDIATES_DIR) -mindepth 1 -type f \
|
|
||||||
$(foreach pkg, $(PRIVATE_JAR_PACKAGES), \
|
|
||||||
-not -path $(PRIVATE_CLASS_INTERMEDIATES_DIR)/$(subst .,/,$(pkg))/\*) -delete ; \
|
|
||||||
find $(PRIVATE_CLASS_INTERMEDIATES_DIR) -empty -delete)
|
|
||||||
$(if $(PRIVATE_JAR_EXCLUDE_PACKAGES), $(hide) rm -rf \
|
|
||||||
$(foreach pkg, $(PRIVATE_JAR_EXCLUDE_PACKAGES), \
|
|
||||||
$(PRIVATE_CLASS_INTERMEDIATES_DIR)/$(subst .,/,$(pkg))))
|
|
||||||
$(if $(PRIVATE_RMTYPEDEFS), $(hide) $(RMTYPEDEFS) -v $(PRIVATE_CLASS_INTERMEDIATES_DIR))
|
|
||||||
$(if $(PRIVATE_JAR_MANIFEST), \
|
|
||||||
$(hide) sed -e 's/%BUILD_NUMBER%/$(BUILD_NUMBER)/' \
|
|
||||||
$(PRIVATE_JAR_MANIFEST) > $(dir $@)/manifest.mf && \
|
|
||||||
jar -cfm $@ $(dir $@)/manifest.mf \
|
|
||||||
-C $(PRIVATE_CLASS_INTERMEDIATES_DIR) ., \
|
|
||||||
$(hide) jar -cf $@ -C $(PRIVATE_CLASS_INTERMEDIATES_DIR) .)
|
|
||||||
$(if $(PRIVATE_EXTRA_JAR_ARGS),$(call add-java-resources-to,$@))
|
|
||||||
$(hide) mv $(PRIVATE_CLASS_INTERMEDIATES_DIR)/newstamp $(PRIVATE_CLASS_INTERMEDIATES_DIR)/stamp
|
|
||||||
endef
|
|
||||||
|
|
||||||
define transform-java-to-classes.jar
|
|
||||||
@echo "target Java: $(PRIVATE_MODULE) ($(PRIVATE_CLASS_INTERMEDIATES_DIR))"
|
|
||||||
$(call compile-java,$(TARGET_JAVAC),$(PRIVATE_BOOTCLASSPATH))
|
|
||||||
endef
|
|
||||||
endif # ENABLE_INCREMENTALJAVAC
|
|
||||||
|
|
||||||
define transform-classes.jar-to-emma
|
define transform-classes.jar-to-emma
|
||||||
$(hide) java -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
|
$(hide) java -classpath $(EMMA_JAR) emma instr -outmode fullcopy -outfile \
|
||||||
$(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR) \
|
$(PRIVATE_EMMA_COVERAGE_FILE) -ip $< -d $(PRIVATE_EMMA_INTERMEDIATES_DIR) \
|
||||||
|
@ -2015,7 +1946,6 @@ $(hide) rm -f $(dir $@)classes*.dex
|
||||||
$(hide) $(DX) \
|
$(hide) $(DX) \
|
||||||
$(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
|
$(if $(findstring windows,$(HOST_OS)),,-JXms16M -JXmx2048M) \
|
||||||
--dex --output=$(dir $@) \
|
--dex --output=$(dir $@) \
|
||||||
$(incremental_dex) \
|
|
||||||
$(if $(NO_OPTIMIZE_DX), \
|
$(if $(NO_OPTIMIZE_DX), \
|
||||||
--no-optimize) \
|
--no-optimize) \
|
||||||
$(if $(GENERATE_DEX_DEBUG), \
|
$(if $(GENERATE_DEX_DEBUG), \
|
||||||
|
|
18
core/main.mk
18
core/main.mk
|
@ -234,23 +234,7 @@ endif
|
||||||
# These are the modifier targets that don't do anything themselves, but
|
# These are the modifier targets that don't do anything themselves, but
|
||||||
# change the behavior of the build.
|
# change the behavior of the build.
|
||||||
# (must be defined before including definitions.make)
|
# (must be defined before including definitions.make)
|
||||||
INTERNAL_MODIFIER_TARGETS := showcommands all incrementaljavac
|
INTERNAL_MODIFIER_TARGETS := showcommands all
|
||||||
|
|
||||||
.PHONY: incrementaljavac
|
|
||||||
incrementaljavac: ;
|
|
||||||
|
|
||||||
# WARNING:
|
|
||||||
# ENABLE_INCREMENTALJAVAC should NOT be enabled by default, because change of
|
|
||||||
# a Java source file won't trigger rebuild of its dependent Java files.
|
|
||||||
# You can only enable it by adding "incrementaljavac" to your make command line.
|
|
||||||
# You are responsible for the correctness of the incremental build.
|
|
||||||
# This may decrease incremental build time dramatically for large Java libraries,
|
|
||||||
# such as core.jar, framework.jar, etc.
|
|
||||||
ENABLE_INCREMENTALJAVAC :=
|
|
||||||
ifneq (,$(filter incrementaljavac, $(MAKECMDGOALS)))
|
|
||||||
ENABLE_INCREMENTALJAVAC := true
|
|
||||||
MAKECMDGOALS := $(filter-out incrementaljavac, $(MAKECMDGOALS))
|
|
||||||
endif
|
|
||||||
|
|
||||||
# EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
|
# EMMA_INSTRUMENT_STATIC merges the static emma library to each emma-enabled module.
|
||||||
ifeq (true,$(EMMA_INSTRUMENT_STATIC))
|
ifeq (true,$(EMMA_INSTRUMENT_STATIC))
|
||||||
|
|
Loading…
Reference in a new issue