From 0d157f366fe0dbae27ace5cdfa7e1b501e5c2ad8 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Fri, 12 Jun 2009 14:57:24 +0200 Subject: Fixed some issues after commit d0e32662845f2c86fd8090858a51a90408d39172 --- Makefile | 10 ++++++++-- 1 file 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))" + -- cgit