]>
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 | |
44211e8c TB |
10 | ifeq ($(uname_S),FreeBSD) |
11 | PYTHON_PATH = /usr/local/bin/python | |
12 | else | |
13 | PYTHON_PATH = /usr/bin/python | |
14 | endif | |
2fe40b63 SR |
15 | endif |
16 | ifndef prefix | |
17 | prefix = $(HOME) | |
18 | endif | |
19 | ifndef V | |
20 | QUIET = @ | |
21 | QUIETSETUP = --quiet | |
22 | endif | |
23 | ||
24 | PYLIBDIR=$(shell $(PYTHON_PATH) -c \ | |
25 | "import sys; \ | |
26 | print 'lib/python%i.%i/site-packages' % sys.version_info[:2]") | |
27 | ||
28 | all: $(pysetupfile) | |
29 | $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) build | |
30 | ||
31 | install: $(pysetupfile) | |
32 | $(PYTHON_PATH) $(pysetupfile) install --prefix $(DESTDIR_SQ)$(prefix) | |
33 | ||
34 | instlibdir: $(pysetupfile) | |
35 | @echo "$(DESTDIR_SQ)$(prefix)/$(PYLIBDIR)" | |
36 | ||
37 | clean: | |
38 | $(QUIET)$(PYTHON_PATH) $(pysetupfile) $(QUIETSETUP) clean -a | |
39 | $(RM) *.pyo *.pyc |