summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-12-21 18:25:36 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-21 18:25:36 +0100
commite9885981804c5f8ebea5d10f3143e576c63bb8ed (patch)
treed92fee4048e3ca8318daa35ac744be9005bb329e /Makefile
parentd0a2d2b8612ed01b4e530611eecd27ca7c1389ba (diff)
downloadrteval-e9885981804c5f8ebea5d10f3143e576c63bb8ed.tar.gz
rteval-e9885981804c5f8ebea5d10f3143e576c63bb8ed.tar.xz
rteval-e9885981804c5f8ebea5d10f3143e576c63bb8ed.zip
Updated the Makefile to fit better with the new regime too
Also get rid of all hard-coded paths for rteval and use setup.py instead. Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile57
1 files changed, 14 insertions, 43 deletions
diff --git a/Makefile b/Makefile
index 90c1a66..60a165d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,27 +1,7 @@
HERE := $(shell pwd)
PACKAGE := rteval
-VERSION := $(shell awk '/Version:/ { print $$2 }' ${PACKAGE}.spec | head -n 1)
+VERSION := $(shell python -c "from rteval import RTEVAL_VERSION; print RTEVAL_VERSION")
D := 10
-PYSRC := rteval/rteval.py \
- rteval/cputopology.py \
- rteval/cyclictest.py \
- rteval/HWLatDetect.py \
- rteval/dmi.py \
- rteval/hackbench.py \
- rteval/__init__.py \
- rteval/kcompile.py \
- rteval/load.py \
- rteval/rtevalclient.py \
- rteval/rtevalConfig.py \
- rteval/rtevalMailer.py \
- rteval/util.py \
- rteval/xmlout.py
-
-XSLSRC := rteval/rteval_dmi.xsl \
- rteval/rteval_text.xsl \
- rteval/rteval_histogram_raw.xsl
-
-CONFSRC := rteval/rteval.conf
# XML-RPC related files
XMLRPCVER := 1.6
@@ -41,21 +21,22 @@ LOADS := $(KLOAD) $(BLOAD)
runit:
[ -d $(HERE)/run ] || mkdir run
- python rteval/rteval.py -D -L -v --workdir=$(HERE)/run --loaddir=$(HERE)/loadsource --duration=$(D) -f $(HERE)/rteval.conf -i $(HERE)/rteval
+ python rteval-cmd -D -L -v --workdir=$(HERE)/run --loaddir=$(HERE)/loadsource --duration=$(D) -f $(HERE)/rteval.conf -i $(HERE)/rteval
load:
[ -d ./run ] || mkdir run
- python rteval/rteval.py --onlyload -D -L -v --workdir=./run --loaddir=$(HERE)/loadsource -f $(HERE)/rteval/rteval.conf -i $(HERE)/rteval
+ python rteval-cmd --onlyload -D -L -v --workdir=./run --loaddir=$(HERE)/loadsource -f $(HERE)/rteval/rteval.conf -i $(HERE)/rteval
sysreport:
- python rteval/rteval.py -D -v --workdir=$(HERE)/run --loaddir=$(HERE)/loadsource --duration=$(D) -i $(HERE)/rteval --sysreport
+ python rteval-cmd -D -v --workdir=$(HERE)/run --loaddir=$(HERE)/loadsource --duration=$(D) -i $(HERE)/rteval --sysreport
clean:
+ [ -f $(XMLRPCDIR)/Makefile ] && make -C $(XMLRPCDIR) clean || echo -n
rm -f *~ rteval/*~ rteval/*.py[co] *.tar.bz2 *.tar.gz doc/*~ server/rteval-xmlrpc-*.tar.gz
realclean: clean
[ -f $(XMLRPCDIR)/Makefile ] && make -C $(XMLRPCDIR) maintainer-clean || echo -n
- rm -rf run tarball rpm
+ rm -rf run rpm
install: install_loads install_rteval
@@ -65,14 +46,6 @@ install_rteval: installdirs
else \
python setup.py install --root=$(DESTDIR); \
fi
- install -m 644 rteval/rteval_text.xsl $(DATADIR)/rteval
- install -m 644 rteval/rteval_dmi.xsl $(DATADIR)/rteval
- install -m 644 rteval/rteval_histogram_raw.xsl $(DATADIR)/rteval
- install -m 644 rteval/rteval.conf $(CONFDIR)
- install -m 644 doc/rteval.8 $(MANDIR)/man8/
- gzip -f $(MANDIR)/man8/rteval.8
- chmod 755 $(PYLIB)/rteval/rteval.py
-# ln -s $(PYLIB)/rteval/rteval.py $(DESTDIR)/usr/bin/rteval;
install_loads: $(LOADS)
[ -d $(DATADIR)/rteval/loadsource ] || mkdir -p $(DATADIR)/rteval/loadsource
@@ -94,14 +67,12 @@ uninstall:
rm -rf $(PYLIB)/rteval
rm -rf $(DATADIR)/rteval
-tarfile:
- rm -rf tarball && mkdir -p tarball/rteval-$(VERSION)/rteval tarball/rteval-$(VERSION)/server tarball/rteval-$(VERSION)/sql
- cp $(PYSRC) tarball/rteval-$(VERSION)/rteval
- cp $(XSLSRC) tarball/rteval-$(VERSION)/rteval
- cp $(CONFSRC) tarball/rteval-$(VERSION)/rteval
- cp -r doc/ tarball/rteval-$(VERSION)
- cp Makefile setup.py rteval.spec COPYING tarball/rteval-$(VERSION)
- tar -C tarball -cjvf rteval-$(VERSION).tar.bz2 rteval-$(VERSION)
+tarfile: rteval-$(VERSION).tar.bz2
+
+rteval-$(VERSION).tar.bz2:
+ python setup.py sdist --formats=bztar --owner root --group root
+ mv dist/rteval-$(VERSION).tar.bz2 .
+ rmdir dist
rteval-xmlrpc-$(XMLRPCVER).tar.gz :
cd $(XMLRPCDIR) ; \
@@ -116,8 +87,8 @@ rpm_prep:
rpms rpm: rpm_prep rtevalrpm loadrpm xmlrpcrpm
-rtevalrpm: tarfile
- cp rteval-$(VERSION).tar.bz2 rpm/SOURCES
+rtevalrpm: rteval-$(VERSION).tar.bz2
+ cp $^ rpm/SOURCES
cp rteval.spec rpm/SPECS
rpmbuild -ba --define "_topdir $(HERE)/rpm" rpm/SPECS/rteval.spec