diff options
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -6,13 +6,15 @@ #. Licensed under the GNU Public License v2 #. +VERSION := $(shell cd src;python -c "from setup_common import *; print get_version();") PACKAGE := python-dmidecode -PY_VER := $(shell python -c 'import sys; print "python%d.%d"%sys.version_info[0:2]') +PY := $(shell python -V 2>&1 |sed -e 's/.\(ython\) \(2\.[0-9]\)\..*/p\1\2/') +PY_VER := $(shell python -c 'import sys; print "%d.%d"%sys.version_info[0:2]') PY := python$(PY_VER) SO = build/lib.linux-$(shell uname -m)-$(PY_VER)/dmidecodemod.so ############################################################################### -.PHONY: build install uninstall clean tarball rpm unit +.PHONY: build install uninstall clean tarball rpm unit version build: $(PY)-dmidecodemod.so $(PY)-dmidecodemod.so: $(SO) @@ -49,3 +51,7 @@ rpm: tarball unit: $(MAKE) -C unit-tests +version: + @echo "python-dmidecode: $(VERSION)" + @echo "python version: $(PY_VER) ($(PY))" + |