Merge changes I12810c1b,I62287a80,Ied96fdc3

* changes:
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
This commit is contained in:
Dan Willemsen 2016-03-01 23:18:27 +00:00 committed by Gerrit Code Review
commit a65b01fc09
15 changed files with 35 additions and 68 deletions

View file

@ -674,7 +674,7 @@ $(eval $(call combine-notice-files, \
$(target_notice_file_html_gz): $(target_notice_file_html) | $(MINIGZIP)
$(hide) $(MINIGZIP) -9 < $< > $@
installed_notice_html_gz := $(TARGET_OUT)/etc/NOTICE.html.gz
$(installed_notice_html_gz): $(target_notice_file_html_gz) | $(ACP)
$(installed_notice_html_gz): $(target_notice_file_html_gz)
$(copy-file-to-target)
# if we've been run my mm, mmm, etc, don't reinstall this every time
@ -1142,7 +1142,7 @@ endif
endif
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH) | $(ACP)
$(INSTALLED_SYSTEMIMAGE): $(BUILT_SYSTEMIMAGE) $(RECOVERY_FROM_BOOT_PATCH)
@echo "Install system fs image: $@"
$(copy-file-to-target)
$(hide) $(call assert-max-image-size,$@ $(RECOVERY_FROM_BOOT_PATCH),$(BOARD_SYSTEMIMAGE_PARTITION_SIZE))

View file

@ -299,26 +299,12 @@ $(foreach c, $(my_path_components),\
## Module installation rule
###########################################################
# Some hosts do not have ACP; override the LOCAL version if that's the case.
ifneq ($(strip $(HOST_ACP_UNAVAILABLE)),)
LOCAL_ACP_UNAVAILABLE := $(strip $(HOST_ACP_UNAVAILABLE))
endif
ifndef LOCAL_UNINSTALLABLE_MODULE
# Define a copy rule to install the module.
# acp and libraries that it uses can't use acp for
# installation; hence, LOCAL_ACP_UNAVAILABLE.
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
@echo "Install: $@"
$(copy-file-to-new-target)
$(PRIVATE_POST_INSTALL_CMD)
else
$(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
@echo "Install: $@"
$(copy-file-to-target-with-cp)
endif
# Rule to install the module's companion init.rc.
my_init_rc_installed :=

View file

@ -528,7 +528,7 @@ $(my_generated_sources): PRIVATE_MODULE := $(my_register_name)
my_gen_sources_copy := $(patsubst $(generated_sources_dir)/%,$(intermediates)/%,$(filter $(generated_sources_dir)/%,$(my_generated_sources)))
$(my_gen_sources_copy): $(intermediates)/% : $(generated_sources_dir)/% | $(ACP)
$(my_gen_sources_copy): $(intermediates)/% : $(generated_sources_dir)/%
@echo "Copy: $@"
$(copy-file-to-target)

View file

@ -25,7 +25,6 @@ LOCAL_EXPORT_PACKAGE_RESOURCES:=
LOCAL_MANIFEST_PACKAGE_NAME:=
LOCAL_PACKAGE_SPLITS:=
LOCAL_REQUIRED_MODULES:=
LOCAL_ACP_UNAVAILABLE:=
LOCAL_MODULE_TAGS:=
LOCAL_SRC_FILES:=
LOCAL_SRC_FILES_EXCLUDE:=

View file

@ -2363,7 +2363,7 @@ endef
# $(1): source file
# $(2): destination file
define copy-one-file
$(2): $(1) | $(ACP)
$(2): $(1)
@echo "Copy: $$@"
$$(copy-file-to-target)
endef
@ -2384,7 +2384,7 @@ endef
# $(1): source file
# $(2): destination file, must end with .xml.
define copy-xml-file-checked
$(2): $(1) | $(ACP)
$(2): $(1)
@echo "Copy xml: $$@"
$(hide) xmllint $$< >/dev/null # Don't print the xml file to stdout.
$$(copy-file-to-target)
@ -2399,13 +2399,15 @@ endef
# Copy a single file from one place to another,
# preserving permissions and overwriting any existing
# file.
# We disable the "-t" option for acp cannot handle
# high resolution timestamp correctly on file systems like ext4.
# Therefore copy-file-to-target is the same as copy-file-to-new-target.
# When we used acp, it could not handle high resolution timestamps
# on file systems like ext4. Because of that, '-t' option was disabled
# and copy-file-to-target was identical to copy-file-to-new-target.
# Keep the behavior until we audit and ensure that switching this back
# won't break anything.
define copy-file-to-target
@mkdir -p $(dir $@)
$(hide) rm -f $@
$(hide) $(ACP) -p $< $@
$(hide) cp $< $@
endef
# The same as copy-file-to-target, but use the local
@ -2436,7 +2438,7 @@ endef
define copy-file-to-new-target
@mkdir -p $(dir $@)
$(hide) rm -f $@
$(hide) $(ACP) -p $< $@
$(hide) cp $< $@
endef
# The same as copy-file-to-new-target, but use the local
@ -2573,7 +2575,7 @@ define add-radio-file
endef
define add-radio-file-internal
INSTALLED_RADIOIMAGE_TARGET += $$(PRODUCT_OUT)/$(2)
$$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1) | $$(ACP)
$$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1)
$$(transform-prebuilt-to-target)
endef
@ -2588,7 +2590,7 @@ endef
define add-radio-file-checked-internal
INSTALLED_RADIOIMAGE_TARGET += $$(PRODUCT_OUT)/$(2)
BOARD_INFO_CHECK += $(3):$(LOCAL_PATH)/$(1)
$$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1) | $$(ACP)
$$(PRODUCT_OUT)/$(2) : $$(LOCAL_PATH)/$(1)
$$(transform-prebuilt-to-target)
endef

View file

@ -35,7 +35,7 @@ define _dexpreopt-boot-jar-remove-classes.dex
_dbj_jar_no_dex := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(1)_nodex.jar
_dbj_src_jar := $(call intermediates-dir-for,JAVA_LIBRARIES,$(1),,COMMON)/javalib.jar
$$(_dbj_jar_no_dex) : $$(_dbj_src_jar) | $(ACP)
$$(_dbj_jar_no_dex) : $$(_dbj_src_jar)
$$(call copy-file-to-target)
ifneq ($(DEX_PREOPT_DEFAULT),nostripping)
$$(call dexpreopt-remove-classes.dex,$$@)

View file

@ -106,8 +106,7 @@ $(built_odex): PRIVATE_DEX_PREOPT_FLAGS := $(LOCAL_DEX_PREOPT_FLAGS)
# Use pattern rule - we may have multiple installed odex files.
# Ugly syntax - See the definition get-odex-file-path.
$(installed_odex) : $(dir $(LOCAL_INSTALLED_MODULE))%$(notdir $(word 1,$(installed_odex))) \
: $(dir $(LOCAL_BUILT_MODULE))%$(notdir $(word 1,$(built_odex))) \
| $(ACP)
: $(dir $(LOCAL_BUILT_MODULE))%$(notdir $(word 1,$(built_odex)))
@echo "Install: $@"
$(copy-file-to-target)
endif

View file

@ -67,10 +67,10 @@ endif
ifeq (true,$(my_pack_module_relocations))
# Pack relocations
$(relocation_packer_output): $(relocation_packer_input) | $(ACP)
$(relocation_packer_output): $(relocation_packer_input)
$(pack-elf-relocations)
else
$(relocation_packer_output): $(relocation_packer_input) | $(ACP)
$(relocation_packer_output): $(relocation_packer_input)
@echo "target Unpacked: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target)
endif
@ -85,7 +85,7 @@ my_unstripped_path := $(LOCAL_UNSTRIPPED_PATH)
endif
symbolic_input := $(relocation_packer_output)
symbolic_output := $(my_unstripped_path)/$(my_installed_module_stem)
$(symbolic_output) : $(symbolic_input) | $(ACP)
$(symbolic_output) : $(symbolic_input)
@echo "target Symbolic: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target)
@ -144,18 +144,9 @@ endif
else
# Don't strip the binary, just copy it. We can't skip this step
# because a copy of the binary must appear at LOCAL_BUILT_MODULE.
#
# If the binary we're copying is acp or a prerequisite,
# use cp(1) instead.
ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(strip_output): $(strip_input) | $(ACP)
@echo "target Unstripped: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target)
else
$(strip_output): $(strip_input)
@echo "target Unstripped: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-target-with-cp)
endif
$(copy-file-to-target)
endif # my_strip_module
$(cleantarget): PRIVATE_CLEAN_FILES += \

View file

@ -445,7 +445,7 @@ $(full_classes_emma_jar): $(full_classes_jarjar_jar) | $(EMMA_JAR)
$(transform-classes.jar-to-emma)
else
$(full_classes_emma_jar): $(full_classes_jarjar_jar) | $(ACP)
$(full_classes_emma_jar): $(full_classes_jarjar_jar)
@echo Copying: $@
$(copy-file-to-target)
endif
@ -561,11 +561,11 @@ extra_input_jar :=
endif
$(full_classes_proguard_jar): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
$(full_classes_proguard_jar): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
$(full_classes_proguard_jar) : $(full_classes_jar) $(extra_input_jar) $(my_support_library_sdk_raise) $(proguard_flag_files) | $(ACP) $(PROGUARD)
$(full_classes_proguard_jar) : $(full_classes_jar) $(extra_input_jar) $(my_support_library_sdk_raise) $(proguard_flag_files) | $(PROGUARD)
$(call transform-jar-to-proguard)
else # LOCAL_PROGUARD_ENABLED not defined
$(full_classes_proguard_jar) : $(full_classes_jar)
$(full_classes_proguard_jar) : $(full_classes_jar) | $(ACP)
@echo Copying: $@
$(hide) $(ACP) -fp $< $@

View file

@ -103,7 +103,7 @@ ifdef LOCAL_DEX_PREOPT
ifneq ($(dexpreopt_boot_jar_module),) # boot jar
# boot jar's rules are defined in dex_preopt.mk
dexpreopted_boot_jar := $(DEXPREOPT_BOOT_JAR_DIR_FULL_PATH)/$(dexpreopt_boot_jar_module)_nodex.jar
$(LOCAL_BUILT_MODULE) : $(dexpreopted_boot_jar) | $(ACP)
$(LOCAL_BUILT_MODULE) : $(dexpreopted_boot_jar)
$(call copy-file-to-target)
# For libart boot jars, we don't have .odex files.
@ -114,7 +114,7 @@ $(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(common_javalib.jar)
@echo "Dexpreopt Jar: $(PRIVATE_MODULE) ($@)"
$(call dexpreopt-one-file,$<,$@)
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP)
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar)
$(call copy-file-to-target)
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)
@ -123,7 +123,7 @@ endif
endif # ! boot jar
else # LOCAL_DEX_PREOPT
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar) | $(ACP)
$(LOCAL_BUILT_MODULE) : $(common_javalib.jar)
$(call copy-file-to-target)
endif # LOCAL_DEX_PREOPT

View file

@ -497,7 +497,7 @@ $(built_apk_splits) : $(built_module_path)/%.apk : $(LOCAL_BUILT_MODULE)
$(sign-package)
# Rules to install the splits
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk | $(ACP)
$(installed_apk_splits) : $(my_module_path)/$(LOCAL_MODULE)_%.apk : $(built_module_path)/package_%.apk
@echo "Install: $@"
$(copy-file-to-new-target)

View file

@ -216,7 +216,7 @@ embedded_prebuilt_jni_libs := 'lib/*.so'
endif
$(built_module): PRIVATE_EMBEDDED_JNI_LIBS := $(embedded_prebuilt_jni_libs)
$(built_module) : $(my_prebuilt_src_file) | $(ACP) $(ZIPALIGN) $(SIGNAPK_JAR) $(AAPT)
$(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(SIGNAPK_JAR) $(AAPT)
$(transform-prebuilt-to-target)
$(uncompress-shared-libs)
ifneq ($(LOCAL_CERTIFICATE),PRESIGNED)
@ -255,12 +255,12 @@ my_src_dir := $(LOCAL_PATH)/$(my_src_dir)
$(built_apk_splits) : PRIVATE_PRIVATE_KEY := $(LOCAL_CERTIFICATE).pk8
$(built_apk_splits) : PRIVATE_CERTIFICATE := $(LOCAL_CERTIFICATE).x509.pem
$(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk | $(ACP) $(AAPT)
$(built_apk_splits) : $(built_module_path)/%.apk : $(my_src_dir)/%.apk | $(AAPT)
$(copy-file-to-new-target)
$(sign-package)
# Rules to install the split apks.
$(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk | $(ACP)
$(installed_apk_splits) : $(my_module_path)/%.apk : $(built_module_path)/%.apk
@echo "Install: $@"
$(copy-file-to-new-target)
@ -279,13 +279,8 @@ ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),)
$(built_module) : $(my_prebuilt_src_file)
$(transform-prebuilt-to-target-strip-comments)
else
ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
$(built_module) : $(my_prebuilt_src_file) | $(ACP)
$(transform-prebuilt-to-target)
else
$(built_module) : $(my_prebuilt_src_file)
$(copy-file-to-target-with-cp)
endif
$(transform-prebuilt-to-target)
endif
endif # LOCAL_MODULE_CLASS != APPS
@ -312,10 +307,10 @@ $(my_src_jar) : $(my_prebuilt_src_file)
$(hide) touch $@
endif
$(common_classes_jar) : $(my_src_jar) | $(ACP)
$(common_classes_jar) : $(my_src_jar)
$(transform-prebuilt-to-target)
$(common_javalib_jar) : $(common_classes_jar) | $(ACP)
$(common_javalib_jar) : $(common_classes_jar)
$(transform-prebuilt-to-target)
$(call define-jar-to-toc-rule, $(common_classes_jar))

View file

@ -12,10 +12,6 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
LOCAL_CXX_STL := none
# acp uses libhost, so we can't use
# acp to install libhost.
LOCAL_ACP_UNAVAILABLE:= true
include $(BUILD_HOST_STATIC_LIBRARY)
# Include toolchain prebuilt modules if they exist.

View file

@ -11,7 +11,6 @@ LOCAL_SRC_FILES := \
LOCAL_STATIC_LIBRARIES := libhost
LOCAL_MODULE := acp
LOCAL_ACP_UNAVAILABLE := true
LOCAL_CXX_STL := none
include $(BUILD_HOST_EXECUTABLE)

View file

@ -31,7 +31,7 @@ LOCAL_MODULE := apicheck
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX)
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/apicheck | $(ACP)
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/etc/apicheck
@echo "Copy: $(PRIVATE_MODULE) ($@)"
$(copy-file-to-new-target)
$(hide) chmod 755 $@