aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 97130bb3643ff8b962f1ed35fad54080025b2280 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.POSIX:

PREFIX = /usr

PYTHON_MAJOR = $$(python --version 2>&1 | cut -d . -f 1 | cut -d ' ' -f 2)
PYTHON_MINOR = $$(python$(PYTHON_MAJOR) --version 2>&1 | cut -d . -f 2)

all:
	@true

info: solar-python.info

solar-python.info: info/solar-python.texinfo info/fdl.texinfo
	$(MAKEINFO) info/solar-python.texinfo

install:
	mkdir -p -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages"
	cp -- solar_python.py "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/"

install-info: solar-python.info
	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/info"
	cp -- solar-python.info "$(DESTDIR)$(PREFIX)/share/info/"

uninstall:
	-rm -f -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/solar_python.py"
	-rm -f -- "$(DESTDIR)$(PREFIX)/share/info/solar-python.info"

.PHONY: clean
clean:
	-rm -rf -- *.pyc *.pyo __pycache__ *.info

.PHONY: all info install install-info uninstall clean