Merge "Make cgrep look for *.c, *.cc, *.cpp, *.h exclusively."
diff --git a/cleanspec.mk b/cleanspec.mk
index d63f3bb..6bb7283 100644
--- a/cleanspec.mk
+++ b/cleanspec.mk
@@ -151,6 +151,8 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libdvm*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgtest_main_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libgtest_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/Music*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Music*)
 
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/core/Makefile b/core/Makefile
index a232e13..1ae7460 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -14,12 +14,15 @@
 # PRODUCT_COPY_FILES contains words like <source file>:<dest file>.
 # <dest file> is relative to $(PRODUCT_OUT), so it should look like,
 # e.g., "system/etc/file.xml".
+# The filter part means "only eval the copy-one-file rule if this
+# src:dest pair is the first one to match %:dest"
 $(foreach cf,$(PRODUCT_COPY_FILES), \
   $(eval _src := $(call word-colon,1,$(cf))) \
-  $(eval _dest := $(call \
-          append-path,$(PRODUCT_OUT),$(call word-colon,2,$(cf)))) \
-  $(eval $(call copy-one-file,$(_src),$(_dest))) \
-  $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_dest)) \
+  $(eval _dest := $(call word-colon,2,$(cf))) \
+  $(eval _fulldest := $(call append-path,$(PRODUCT_OUT),$(_dest))) \
+  $(if $(filter $(_src):$(_dest),$(firstword $(filter %:$(_dest),$(PRODUCT_COPY_FILES)))), \
+    $(eval $(call copy-one-file,$(_src),$(_fulldest))),) \
+  $(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
  )
 
 # -----------------------------------------------------------------
diff --git a/core/main.mk b/core/main.mk
index 24ac676..688ad9d 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -398,7 +398,6 @@
 	sdk/layoutlib_utils \
 	sdk/ninepatch \
 	sdk/sdkstats \
-	sdk/builders \
 	sdk/sdkmanager \
 	sdk/layoutopt \
 	development/apps \
diff --git a/tools/dexpreopt/dexpreopt.py b/tools/dexpreopt/dexpreopt.py
index 5dde642..376f135 100755
--- a/tools/dexpreopt/dexpreopt.py
+++ b/tools/dexpreopt/dexpreopt.py
@@ -125,6 +125,10 @@
   else:
     args += ['-shell']
 
+  # This is a work-around for the ARMv7 emulation bug.
+  # XXX: It only works by chance, if any ! A real emulation fix is on the way
+  args += ['-qemu', '-singlestep']
+
   # Ensure that this environment variable isn't set;
   # if it is, the emulator will print the log to stdout.
   if os.environ.get('ANDROID_LOG_TAGS'):