Removed osx stuff, don't really want to go there
[sfa.git] / Makefile
index 66219b0..3bdf714 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,13 +4,19 @@
 # overwritten by the specfile
 DESTDIR="/"
 
+ifndef PREFIX
+       PREFIX="/usr"
+endif
+
 ##########
 all: keyconvert python wsdl
 
-install: keyconvert-install python-install wsdl-install xmlbuilder-install
+install: keyconvert-install python-install wsdl-install xmlbuilder-install 
 
 clean: keyconvert-clean python-clean wsdl-clean
 
+uninstall: python-uninstall
+
 .PHONY: all install clean 
 
 ##########
@@ -29,12 +35,17 @@ keyconvert-clean:
 python: 
 
 xmlbuilder-install:
-       python xmlbuilder-0.9/setup.py install 
-       
+       cd xmlbuilder-0.9 && python setup.py install --root=$(DESTDIR) && cd -
 python-install:
-       python setup.py install --root=$(DESTDIR)
+       python setup.py install --root=$(DESTDIR) --home=$(PREFIX) | grep copying >> python_install.log 
        chmod 444 $(DESTDIR)/etc/sfa/default_config.xml
 
+python-uninstall:
+       python setup.py uninstall
+       bash uninstall_python.sh
+       $(awk '{print $$4}' python_install.log)
+
 python-clean:
        python setup.py clean
        rm $(init)