Fix dex file dependencies for oat tests.

The initial prerequisit used as an argument to "cp" wasn't set causing dex2oat
to attempt to compile dex2oat. Make the setting of host and target dex
dependencies more explicit in build-art-test-dex and update the test rules
appropriately.

Change-Id: I4f591f817537043bcb0328c7623fe7e2f0830b60
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk
index 542e888..ed07129 100644
--- a/build/Android.common_test.mk
+++ b/build/Android.common_test.mk
@@ -87,7 +87,8 @@
 # $(2): input test directory in art/test, e.g. HelloWorld
 # $(3): target output module path (default module path is used on host)
 # $(4): additional dependencies
-# $(5): a make variable used to collate dependencies
+# $(5): a make variable used to collate target dependencies, e.g ART_TEST_TARGET_OAT_HelloWorld_DEX
+# $(6): a make variable used to collate host dependencies, e.g ART_TEST_HOST_OAT_HelloWorld_DEX
 define build-art-test-dex
   ifeq ($(ART_BUILD_TARGET),true)
     include $(CLEAR_VARS)
@@ -113,7 +114,7 @@
     LOCAL_JAVA_LIBRARIES := $(HOST_CORE_JARS)
     LOCAL_DEX_PREOPT_IMAGE := $(HOST_CORE_IMG_LOCATION)
     include $(BUILD_HOST_DALVIK_JAVA_LIBRARY)
-    $(5)-host := $$(LOCAL_INSTALLED_MODULE)
+    $(6) := $$(LOCAL_INSTALLED_MODULE)
   endif
 endef