From 8ec98c0d9ac5b42d9157cc1f2d5160a07fac16e8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:40:29 +0200 Subject: Improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 50ede37..7857bc4 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,21 @@ .POSIX: -PREFIX = /usr/local +CONFIGFILE = config.mk +include $(CONFIGFILE) -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 check: - python$(PYTHON_MAJOR) ./test.py + $(PYTHON) ./test.py install: - mkdir -p -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages" - cp -- arg.py "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/" + mkdir -p -- "$(DESTDIR)$(PYTHONPKGDIR)" + cp -- arg.py "$(DESTDIR)$(PYTHONPKGDIR)/" uninstall: - -rm -f -- "$(DESTDIR)$(PREFIX)/lib/python$(PYTHON_MAJOR).$(PYTHON_MINOR)/site-packages/arg.py" + -rm -f -- "$(DESTDIR)$(PYTHONPKGDIR)/arg.py" clean: -rm -rf -- *.pyc *.pyo __pycache__ -- cgit v1.2.3-70-g09d2