Allow cloning an empty repository
[gitweb.git] / Makefile
index 2b873fa99f8ddc70c7560fd64a516a051afc3a7a..270b223adb8704070997bf02dffff2c94a91de69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1357,6 +1357,7 @@ endif
 ### Testing rules
 
 TEST_PROGRAMS += test-chmtime$X
+TEST_PROGRAMS += test-ctype$X
 TEST_PROGRAMS += test-date$X
 TEST_PROGRAMS += test-delta$X
 TEST_PROGRAMS += test-genrandom$X
@@ -1376,6 +1377,8 @@ export NO_SVN_TESTS
 test: all
        $(MAKE) -C t/ all
 
+test-ctype$X: ctype.o
+
 test-date$X: date.o ctype.o
 
 test-delta$X: diff-delta.o patch-delta.o
@@ -1441,10 +1444,12 @@ endif
        { $(RM) "$$execdir/git-add$X" && \
                ln git-add$X "$$execdir/git-add$X" 2>/dev/null || \
                cp git-add$X "$$execdir/git-add$X"; } && \
-       { $(foreach p,$(filter-out git-add$X,$(BUILT_INS)), $(RM) "$$execdir/$p" && \
-               ln "$$execdir/git-add$X" "$$execdir/$p" 2>/dev/null || \
-               ln -s "git-add$X" "$$execdir/$p" 2>/dev/null || \
-               cp "$$execdir/git-add$X" "$$execdir/$p" || exit;) } && \
+       { for p in $(filter-out git-add$X,$(BUILT_INS)); do \
+               $(RM) "$$execdir/$$p" && \
+               ln "$$execdir/git-add$X" "$$execdir/$$p" 2>/dev/null || \
+               ln -s "git-add$X" "$$execdir/$$p" 2>/dev/null || \
+               cp "$$execdir/git-add$X" "$$execdir/$$p" || exit; \
+         done } && \
        ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
 
 install-doc: