Allow hierarchical section names
[git.git] / Makefile
index d8bb375..d6dad19 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -125,18 +125,34 @@ PROGRAMS = \
        git-unpack-objects$X git-update-index$X git-update-server-info$X \
        git-upload-pack$X git-verify-pack$X git-write-tree$X \
        git-update-ref$X git-symbolic-ref$X git-check-ref-format$X \
-       git-name-rev$X git-pack-redundant$X git-var$X $(SIMPLE_PROGRAMS)
+       git-name-rev$X git-pack-redundant$X git-config-set$X git-var$X \
+       $(SIMPLE_PROGRAMS)
 
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
 
 GIT_LIST_TWEAK =
 
+# Set paths to tools early so that they can be used for version tests.
+ifndef SHELL_PATH
+       SHELL_PATH = /bin/sh
+endif
+ifndef PERL_PATH
+       PERL_PATH = /usr/bin/perl
+endif
+ifndef PYTHON_PATH
+       PYTHON_PATH = /usr/bin/python
+endif
+
 PYMODULES = \
        gitMergeCommon.py
 
 ifdef WITH_OWN_SUBPROCESS_PY
        PYMODULES += compat/subprocess.py
+else
+       ifneq ($(shell $(PYTHON_PATH) -c 'import subprocess;print"OK"' 2>/dev/null),OK)
+               PYMODULES += compat/subprocess.py
+       endif
 endif
 
 ifdef WITH_SEND_EMAIL
@@ -242,22 +258,15 @@ ifndef NO_CURL
                CURL_LIBCURL = -lcurl
        endif
        PROGRAMS += git-http-fetch$X
-       ifndef NO_EXPAT
-               EXPAT_LIBEXPAT = -lexpat
-               PROGRAMS += git-http-push$X
+       curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
+       ifeq "$(curl_check)" "070908"
+               ifndef NO_EXPAT
+                       EXPAT_LIBEXPAT = -lexpat
+                       PROGRAMS += git-http-push$X
+               endif
        endif
 endif
 
-ifndef SHELL_PATH
-       SHELL_PATH = /bin/sh
-endif
-ifndef PERL_PATH
-       PERL_PATH = /usr/bin/perl
-endif
-ifndef PYTHON_PATH
-       PYTHON_PATH = /usr/bin/python
-endif
-
 ifndef NO_OPENSSL
        LIB_OBJS += epoch.o
        OPENSSL_LIBSSL = -lssl
@@ -387,7 +396,8 @@ $(SIMPLE_PROGRAMS) : git-%$X : %.o
        $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
                $(LIB_FILE) $(SIMPLE_LIB)
 
-git-http-fetch$X: fetch.o
+git-http-fetch$X: fetch.o http.o
+git-http-push$X: http.o
 git-local-fetch$X: fetch.o
 git-ssh-fetch$X: rsh.o fetch.o
 git-ssh-upload$X: rsh.o