Skip to content

Commit

Permalink
Add Python version checks to the Makefile to automatically set WITH_O…
Browse files Browse the repository at this point in the history
…WN_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>
  • Loading branch information
pugmajere authored and Junio C Hamano committed Nov 21, 2005
1 parent bd22c90 commit 3d32051
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3d32051

Please sign in to comment.