# These are the modifier targets that don't do anything themselves, but
# change the behavior of the build.
# (must be defined before including definitions.make)
-INTERNAL_MODIFIER_TARGETS := showcommands checkbuild all
+INTERNAL_MODIFIER_TARGETS := showcommands checkbuild all incrementaljavac
+
+.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
# Bring in standard build system definitions.
include $(BUILD_SYSTEM)/definitions.mk
###
is_sdk_build :=
-ifneq ($(filter sdk,$(MAKECMDGOALS)),)
-is_sdk_build := true
-endif
-ifneq ($(filter win_sdk,$(MAKECMDGOALS)),)
-is_sdk_build := true
-endif
-ifneq ($(filter sdk_addon,$(MAKECMDGOALS)),)
+
+ifneq ($(filter sdk win_sdk sdk_addon,$(MAKECMDGOALS)),)
is_sdk_build := true
endif
## sdk ##
ifdef is_sdk_build
+
+# Detect if we want to build a repository for the SDK
+sdk_repo_goal := $(strip $(filter sdk_repo,$(MAKECMDGOALS)))
+MAKECMDGOALS := $(strip $(filter-out sdk_repo,$(MAKECMDGOALS)))
+
ifneq ($(words $(filter-out $(INTERNAL_MODIFIER_TARGETS),$(MAKECMDGOALS))),1)
$(error The 'sdk' target may not be specified with any other targets)
endif
ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.dexopt-flags=m=y
endif
+ifneq ($(BUILD_TINY_ANDROID),true)
# Install an apns-conf.xml file if one's not already being installed.
ifeq (,$(filter %:system/etc/apns-conf.xml, $(PRODUCT_COPY_FILES)))
PRODUCT_COPY_FILES += \
$(warning implicitly installing apns-conf_sdk.xml)
endif
endif
-# If we're on an eng or tests build, but not on the sdk, and we have
-# a better one, use that instead.
-ifneq ($(filter eng tests,$(TARGET_BUILD_VARIANT)),)
- ifndef is_sdk_build
- apns_to_use := $(wildcard vendor/google/etc/apns-conf.xml)
- ifneq ($(strip $(apns_to_use)),)
- PRODUCT_COPY_FILES := \
- $(filter-out %:system/etc/apns-conf.xml,$(PRODUCT_COPY_FILES)) \
- $(strip $(apns_to_use)):system/etc/apns-conf.xml
- endif
- endif
endif
ADDITIONAL_BUILD_PROPERTIES += net.bt.name=Android
sdk/archquery \
sdk/androidprefs \
sdk/apkbuilder \
+ sdk/common \
sdk/ddms \
sdk/hierarchyviewer2 \
sdk/ide_common \
bionic \
system/core \
system/extras/ext4_utils \
+ system/extras/su \
build/libs \
build/target \
build/tools/acp \
build/tools/apriori \
- build/tools/kcm \
build/tools/soslim \
external/elfcopy \
external/elfutils \
.PHONY: sdk
ALL_SDK_TARGETS := $(INTERNAL_SDK_TARGET)
sdk: $(ALL_SDK_TARGETS)
-ifneq ($(filter sdk,$(MAKECMDGOALS)),)
-$(call dist-for-goals,sdk, \
+ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
+$(call dist-for-goals,sdk win_sdk, \
$(ALL_SDK_TARGETS) \
$(SYMBOLS_ZIP) \
)
.PHONY: clean
clean:
+ @make avp-clean
@rm -rf $(OUT_DIR)
@echo "Entire build directory removed."