[PATCH 1/2] git_remote_cvs: Honor DESTDIR in the Makefile
- From
David Aguilar <davvid@gmail.com>
- Date
- Aug 16, 2009, 20:38 UTC
- Message-ID
- <1250455088-23457-1-git-send-email-davvid@gmail.com>
- In-Reply-To
- <7v7hx35ym1.fsf@alter.siamese.dyndns.org>
This adds the --root=<path> flag to setup.py so that the user-provided DESTDIR is honored.
Signed-off-by: David Aguilar <davvid@gmail.com> --- git_remote_cvs/Makefile | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/git_remote_cvs/Makefile b/git_remote_cvs/Makefile index 8dbf3fa..f52c096 100644 --- a/git_remote_cvs/Makefile +++ b/git_remote_cvs/Makefile @@ -3,6 +3,15 @@ # pysetupfile:=setup.py +# Setup the DESTDIR for Python. +ifeq ($(DESTDIR),) +PYTHON_DESTDIR = / +else +PYTHON_DESTDIR = $(DESTDIR) +endif +# Shell quote (do not use $(call) to accommodate ancient setups); +PYTHON_DESTDIR_SQ = $(subst ','\'',$(PYTHON_DESTDIR)) + ifndef PYTHON_PATH PYTHON_PATH = /usr/bin/python endif @@ -19,7 +28,10 @@ PYLIBDIR=`$(PYTHON_PATH) -c "import sys; print 'lib/python%i.%i/site-packages' % all: $(pysetupfile) $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build install: $(pysetupfile) - $(PYTHON_PATH) $(pysetupfile) install --prefix $(prefix) + $(PYTHON_PATH) $(pysetupfile) install \ + --prefix $(prefix) \ + --root $(PYTHON_DESTDIR_SQ) + instlibdir: $(pysetupfile) @echo "$(prefix)/$(PYLIBDIR)" clean:
-- 1.6.4.169.g64d5