From 832f6d8ab4c8dc2f4e6f5e9c0f365f75995c4ed0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 13 Apr 2006 19:32:22 +0000 Subject: [PATCH] make install can now handle sevral version of python by using make install PYTHON=python2.4 for exemple. --- Makefile | 5 +++-- scripts/gajim | 2 +- scripts/gajim-remote | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 71369609c..beed17177 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ GAJIM_AP = 0 # do we build Autopackage? MODULES = src src/common po PREFIX = /usr/local +PYTHON = python DESTDIR = OPTFLAGS = export OPTFLAGS @@ -111,9 +112,9 @@ install: for s in $(SCRIPTS) ; do \ BASE=`basename "$$s"`; \ if [ $(GAJIM_AP) -ne 0 ] ; then \ - F=`cat "$$s" | sed -e 's!LIB!$(LIBDIR)!g'`; \ + F=`cat "$$s" | sed -e 's!LIB!$(LIBDIR)!g' -e 's!PYTHON_EXEC!$(PYTHON)!g'`; \ else \ - F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g' -e 's!LIB!$(LIBDIR)!g'`; \ + F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g' -e 's!LIB!$(LIBDIR)!g' -e 's!PYTHON_EXEC!$(PYTHON)!g'`; \ fi; \ echo "$$F" > "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \ chmod +x "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \ diff --git a/scripts/gajim b/scripts/gajim index 0e12d21d7..7fed98d39 100644 --- a/scripts/gajim +++ b/scripts/gajim @@ -29,4 +29,4 @@ fi cd PREFIX/share/gajim/src export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim" -exec python -OO gajim.py $@ +exec PYTHON_EXEC -OO gajim.py $@ diff --git a/scripts/gajim-remote b/scripts/gajim-remote index 9338c503c..4b2a762cb 100755 --- a/scripts/gajim-remote +++ b/scripts/gajim-remote @@ -30,4 +30,4 @@ fi cd PREFIX/share/gajim/src export PYTHONPATH="$PYTHONPATH:PREFIXLIB/gajim" -exec python -OO gajim-remote.py "$@" +exec PYTHON_EXEC -OO gajim-remote.py "$@"