summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRyan Anderson <ryan@michonline.com>2005-11-21 05:11:22 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-21 06:17:56 (GMT)
commit3d32051f4fd657747de00cb9d516dc3512bb377d (patch)
treeeebf0c21cfedda82c0cd865b471c594a0b422610 /Makefile
parentbd22c904a0f1c88a3a7bfa96bbf690de2f5cb278 (diff)
downloadgit-3d32051f4fd657747de00cb9d516dc3512bb377d.zip
git-3d32051f4fd657747de00cb9d516dc3512bb377d.tar.gz
git-3d32051f4fd657747de00cb9d516dc3512bb377d.tar.bz2
Add Python version checks to the Makefile to automatically set WITH_OWN_SUBPROCESS_PY
Also rearrange some path settings in the Makefile in the process. Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 092931a..d6dad19 100644
--- a/Makefile
+++ b/Makefile
@@ -133,11 +133,26 @@ 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
@@ -252,16 +267,6 @@ ifndef NO_CURL
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