File: python.mk

package info (click to toggle)
libselinux 2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-backports, jessie-kfreebsd
  • size: 2,052 kB
  • ctags: 2,413
  • sloc: ansic: 13,550; makefile: 320; sh: 20
file content (22 lines) | stat: -rw-r--r-- 727 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/make --no-print-directory -f

## Default target
PYTHON_VERSIONS := $(shell pyversions -r)
all: $(PYTHON_VERSIONS)

## Targets share the same output files, so must be run serially
.NOTPARALLEL:
.PHONY: all $(PYTHON_VERSIONS)

## SELinux does not have a very nice build process
extra_python_args  = PYLIBVER=$@
extra_python_args += PYTHONLIBDIR=-L$(DESTDIR)/usr/lib/$@
extra_python_args += PYINC=-I/usr/include/$@

## How to build and install each individually-versioned copy
$(PYTHON_VERSIONS): python%:
	+$(MAKE) $(extra_python_args) clean-pywrap
	+$(MAKE) $(extra_python_args) install-pywrap
	@# Fix the python library directory path
	mv	$(DESTDIR)/usr/lib/$@/site-packages \
		$(DESTDIR)/usr/lib/$@/dist-packages