Disable "-t" for acp.

Acp can not handle high resolution file timestamp on ext4.
We need this to fix incremental build on ext4.

Change-Id: I54e45c73ffa44c4253c7a431375d419fa4dccfd9
diff --git a/core/base_rules.mk b/core/base_rules.mk
index d0af289..d0c4aaf 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -520,7 +520,7 @@
 ifneq ($(LOCAL_ACP_UNAVAILABLE),true)
 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE) | $(ACP)
 	@echo "Install: $@"
-	$(copy-file-to-target)
+	$(copy-file-to-new-target)
 else
 $(LOCAL_INSTALLED_MODULE): $(LOCAL_BUILT_MODULE)
 	@echo "Install: $@"
@@ -534,7 +534,7 @@
 	@echo "Install: $@"
 	$(copy-file-to-target)
 
-$(LOCAL_INSTALLED_MODULE) : | $(installed_odex)
+$(LOCAL_INSTALLED_MODULE) : $(installed_odex)
 endif
 
 endif # !LOCAL_UNINSTALLABLE_MODULE
diff --git a/core/definitions.mk b/core/definitions.mk
index 6ba7485..ea47f6b 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -1634,9 +1634,12 @@
 # Copy a single file from one place to another,
 # preserving permissions and overwriting any existing
 # file.
+# We disable the "-t" option for acp can not handle
+# high resolution timestamp correctly on file systems like ext4.
+# Therefore copy-file-to-target is the same as copy-file-to-new-target.
 define copy-file-to-target
 @mkdir -p $(dir $@)
-$(hide) $(ACP) -fpt $< $@
+$(hide) $(ACP) -fp $< $@
 endef
 
 # The same as copy-file-to-target, but use the local
@@ -1725,7 +1728,7 @@
 # Command to copy the file with acp, if proguard is disabled.
 define proguard-disabled-commands
 @echo Copying: $@
-$(hide) $(ACP) $< $@
+$(hide) $(ACP) -fp $< $@
 endef
 
 # Command to call Proguard
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index 6e0b093..4da2632 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -51,7 +51,7 @@
 	@echo "Dexpreopt Boot Jar: $$@"
 	$(hide) rm -f $$@
 	$(hide) mkdir -p $$(dir $$@)
-	$(hide) $(ACP) -fpt $$< $$(PRIVATE_DBJ_JAR)
+	$(hide) $(ACP) -fp $$< $$(PRIVATE_DBJ_JAR)
 	$$(call dexpreopt-one-file,$$(PRIVATE_DBJ_JAR),$$@)
 
 $(_dbj_jar_no_dex) : $(_dbj_src_jar) | $(ACP) $(AAPT)
@@ -60,6 +60,7 @@
 
 $(eval _dbj_jar :=)
 $(eval _dbj_odex :=)
+$(eval _dbj_jar_no_dex :=)
 $(eval _dbj_src_jar :=)
 endef
 
diff --git a/core/java.mk b/core/java.mk
index e2eabed..949af3c 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -237,7 +237,7 @@
 else
 $(full_classes_jarjar_jar): $(full_classes_compiled_jar) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 endif
 
 ifeq ($(LOCAL_IS_STATIC_JAVA_LIBRARY),true)
@@ -275,7 +275,7 @@
 # Keep a copy of the jar just before proguard processing.
 $(full_classes_jar): $(full_classes_emma_jar) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 
 # Run proguard if necessary, otherwise just copy the file.
 proguard_dictionary := $(intermediates.COMMON)/proguard_dictionary
@@ -337,7 +337,7 @@
 	$(transform-classes.jar-to-dex)
 $(built_dex): $(built_dex_intermediate) | $(ACP)
 	@echo Copying: $@
-	$(hide) $(ACP) $< $@
+	$(hide) $(ACP) -fp $< $@
 ifneq ($(GENERATE_DEX_DEBUG),)
 	$(install-dex-debug)
 endif