]> granicus.if.org Git - clang/commitdiff
If you download clang and delete the test directory, you can end up
authorDouglas Gregor <dgregor@apple.com>
Tue, 27 Sep 2011 21:28:10 +0000 (21:28 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 27 Sep 2011 21:28:10 +0000 (21:28 +0000)
with the copy line failing with an error, yet the make will complete
successfully. From Greg Clayton!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140639 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile

index b6c630aa10afe888d31bf6cf5eb24859192f19a0..50dcf8c127d5c2bb86ca26c85fd03ddd1e6e7543 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ ifeq ($(IS_TOP_LEVEL),1)
 ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
 $(RecursiveTargets)::
        $(Verb) for dir in test unittests; do \
-         if [ ! -f $${dir}/Makefile ]; then \
+         if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \
            $(MKDIR) $${dir}; \
            $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \
          fi \