Code

Makefile: minor improvements for Mac OS X (Darwin)
[git.git] / Makefile
index 9f3a8ab0977bf23eb276e9cf5a6db96b206893e3..627d4d09ba55259d23a2270a2d464ac97348d410 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -649,10 +649,12 @@ endif
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
-       ifneq ($(shell expr "$(uname_R)" : '9\.'),2)
+       ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
                OLD_ICONV = UnfortunatelyYes
        endif
-       NO_STRLCPY = YesPlease
+       ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
+               NO_STRLCPY = YesPlease
+       endif
        NO_MEMMEM = YesPlease
        THREADED_DELTA_SEARCH = YesPlease
 endif
@@ -1382,6 +1384,7 @@ TEST_PROGRAMS += test-chmtime$X
 TEST_PROGRAMS += test-ctype$X
 TEST_PROGRAMS += test-date$X
 TEST_PROGRAMS += test-delta$X
+TEST_PROGRAMS += test-dump-cache-tree$X
 TEST_PROGRAMS += test-genrandom$X
 TEST_PROGRAMS += test-match-trees$X
 TEST_PROGRAMS += test-parse-options$X
@@ -1433,14 +1436,14 @@ remove-dashes:
 
 ### Installation rules
 
-ifeq ($(abspath $(template_dir)),$(template_dir))
+ifneq ($(filter /%,$(firstword $(template_dir))),)
 template_instdir = $(template_dir)
 else
 template_instdir = $(prefix)/$(template_dir)
 endif
 export template_instdir
 
-ifeq ($(abspath $(gitexecdir)),$(gitexecdir))
+ifneq ($(filter /%,$(firstword $(gitexecdir))),)
 gitexec_instdir = $(gitexecdir)
 else
 gitexec_instdir = $(prefix)/$(gitexecdir)