summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-06-12 14:57:24 +0200
committerDavid Sommerseth <davids@redhat.com>2009-06-12 14:57:24 +0200
commit0d157f366fe0dbae27ace5cdfa7e1b501e5c2ad8 (patch)
treed0d9253d4216e039fe2442356d555abd2c831bb4
parentd0e32662845f2c86fd8090858a51a90408d39172 (diff)
downloadpython-dmidecode-0d157f366fe0dbae27ace5cdfa7e1b501e5c2ad8.tar.gz
python-dmidecode-0d157f366fe0dbae27ace5cdfa7e1b501e5c2ad8.tar.xz
python-dmidecode-0d157f366fe0dbae27ace5cdfa7e1b501e5c2ad8.zip
Fixed some issues after commit d0e32662845f2c86fd8090858a51a90408d39172
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1427f5a..669e7f3 100644
--- a/Makefile
+++ b/Makefile
@@ -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))"
+