Linux/Ns-3/Dce cross experiments
[nepi.git] / Makefile
index 1a3420c..01a1d3b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@ TESTLIB  = $(TESTDIR)/lib
 BUILDDIR    = $(CURDIR)/build
 DISTDIR     = $(CURDIR)/dist
 
-# stupid distutils, it's broken in so many ways
 SUBBUILDDIR = $(shell python -c 'import distutils.util, sys; \
              print "lib.%s-%s" % (distutils.util.get_platform(), \
              sys.version[0:3])')
@@ -21,7 +20,7 @@ PYPATH = $(BUILDDIR):$(TESTLIB):$(PYTHONPATH)
 COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \
           coverage)
 
-all:
+all: clean
        PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py build
 
 install: all
@@ -30,13 +29,13 @@ install: all
 test: all
        retval=0; \
               for i in `find "$(TESTDIR)" -iname '*.py' -perm -u+x -type f`; do \
-              @echo $$i; \
+              echo $$i; \
               PYTHONPATH="$(PYPATH)" $$i -v || retval=$$?; \
               done; exit $$retval
 
 test-one: all
-       @echo $(file) $(case)
-       PYTHONPATH="$(PYPATH)" python $(file) $(case)
+       echo $(file) $(case)
+       PYTHONPATH="$(PYPATH)" $(file) $(case)
 
 coverage: all
        rm -f .coverage
@@ -49,8 +48,8 @@ coverage: all
        rm -f .coverage
 
 clean:
-       ./setup.py clean
        rm -f `find -name \*.pyc` .coverage *.pcap
+       rm -rf "$(BUILDDIR)"
 
 distclean: clean
        rm -rf "$(DISTDIR)"