Fix make test when configuring for a seperate build directory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62614 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile b/Makefile
index 51693c4..67cc282 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,14 @@
 
 include $(LEVEL)/Makefile.common
 
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+test::
+	$(Verb) if [ ! -f test/Makefile ]; then \
+	  $(MKDIR) test; \
+	  $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
+	fi
+endif
+
 test::
 	@ $(MAKE) -C test