replace most of subprocess calls by new runner apis
[tools/mic.git] / Makefile
index 23a4b5c..719293c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ PYTHON ?= python
 VERSION = $(shell cat VERSION)
 TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")
 
-PKGNAME = micng
+PKGNAME = mic
 
 ifeq ($(VERSION), $(TAGVER))
        TAG = $(TAGVER)
@@ -10,20 +10,23 @@ else
        TAG = "HEAD"
 endif
 
+ifndef PREFIX
+    PREFIX = "/usr/local"
+endif
 
 all:
        $(PYTHON) setup.py build
 
 dist-bz2:
-       git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
-               bzip2  > $(PKGNAME)-$(VERSION).tar.bz2
+       git archive --format=tar --prefix=$(PKGNAME)-$(TAGVER)/ $(TAG) | \
+               bzip2  > $(PKGNAME)-$(TAGVER).tar.bz2
 
 dist-gz:
-       git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
-               gzip  > $(PKGNAME)-$(VERSION).tar.gz
+       git archive --format=tar --prefix=$(PKGNAME)-$(TAGVER)/ $(TAG) | \
+               gzip  > $(PKGNAME)-$(TAGVER).tar.gz
 
 install: all
-       $(PYTHON) setup.py install --root=${DESTDIR}
+       $(PYTHON) setup.py install  --prefix=$(DESTDIR)/$(PREFIX)
 
 develop: all
        $(PYTHON) setup.py develop