]>
Commit | Line | Data |
---|---|---|
2fe40b63 SR |
1 | # |
2 | # Makefile for the git_remote_helpers python support modules | |
3 | # | |
4 | pysetupfile:=setup.py | |
5 | ||
6 | # Shell quote (do not use $(call) to accommodate ancient setups); | |
7 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) | |
8 | ||
9 | ifndef PYTHON_PATH | |
10 | PYTHON_PATH = /usr/bin/python | |
11 | endif | |
12 | ifndef prefix | |
13 | prefix = $(HOME) | |
14 | endif | |
15 | ifndef V | |
16 | QUIET = @ | |
17 | QUIETSETUP = --quiet | |
18 | endif | |
19 | ||
20 | PYLIBDIR=$(shell $(PYTHON_PATH) -c \ | |
21 | "import sys; \ | |
22 | print 'lib/python%i.%i/site-packages' % sys.version_info[:2]") | |
23 | ||
24 | all: $(pysetupfile) | |
25 | $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build | |
26 | ||
27 | install: $(pysetupfile) | |
28 | $(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix) | |
29 | ||
30 | instlibdir: $(pysetupfile) | |
31 | @echo "$(DESTDIR_SQ)$(prefix)/$(PYLIBDIR)" | |
32 | ||
33 | clean: | |
34 | $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) clean -a | |
35 | $(RM) *.pyo *.pyc |