Better Makefile build, and fixes in spec file.
[myops.git] / Makefile
index 3e7a7d6..d8bc8ad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,8 +12,12 @@ main.FILE    := myops-1.0.tar.bz2
 # Thierry - when called from within the build, PWD is /build
 SOURCEFILES := $(main.FILE)
 
+all: rpm
+
 $(main.FILE): #FORCE
        rm -f myops-1.0.tar.bz2
+       ( test -d $(PWD)/../myops-1.0 &&  unlink $(PWD)/../myops-1.0/ ) || echo "none"
+       ln -s $(PWD) $(PWD)/../myops-1.0
        tar -jchvf myops-1.0.tar.bz2 -C ../  myops-1.0
        @echo "hello"
 
@@ -36,4 +40,6 @@ rpm: sources
 
 clean:
        rm -f *.rpm *.tgz *.bz2 *.gz
-       rm *.pyc *.dat *.log
+       rm -rf myops-1.0
+       unlink $(PWD)/../myops-1.0
+       rm -f *.pyc *.dat *.log