magic for debugging in make
[sfa.git] / Makefile
index 82ec3a9..6279ed1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ PREFIX=/usr
 ##########
 all: python wsdl 
 
-install: python-install wsdl-install xmlbuilder-install tests-install
+install: python-install wsdl-install tests-install
 
 clean: python-clean wsdl-clean 
 
@@ -28,10 +28,6 @@ version: sfa/util/version.py
 sfa/util/version.py: sfa/util/version.py.in force
        sed -e "s,@VERSIONTAG@,$(VERSIONTAG),g" -e "s,@SCMURL@,$(SCMURL),g" sfa/util/version.py.in > $@
 
-xmlbuilder-install:
-       cd xmlbuilder-0.9 && python setup.py install --prefix=$(PREFIX) --root=$(DESTDIR) && cd -
-       rm -rf $(DESTDIR)/usr/lib*/python*/site-packages/*egg-info
-
 # postinstall steps - various cleanups and tweaks for a nicer rpm
 python-install:
        python setup.py install --prefix=$(PREFIX) --root=$(DESTDIR)
@@ -47,7 +43,7 @@ python-clean: version-clean
 version-clean:
        rm -f sfa/util/version.py
 
-.PHONY: python version python-install python-clean version-clean xmlbuilder-install 
+.PHONY: python version python-install python-clean version-clean 
 ##########
 wsdl: 
        $(MAKE) -C wsdl 
@@ -127,8 +123,12 @@ force:
 # a lot of stuff in the working dir is just noise
 files:
        @find . -type f | egrep -v '^\./\.|/\.git/|/\.svn/|TAGS|AA-|~$$|egg-info|\.(py[co]|doc|html|pdf|png|svg|out|bak|dg|pickle)$$' 
+
+git-files:
+       @git ls-files | grep -v '\.doc$$'
+
 tags:  
-       $(MAKE) files | xargs etags
+       $(MAKE) git-files | xargs etags
 
 .PHONY: files tags
 
@@ -149,7 +149,7 @@ SSHURL:=root@$(PLC):/
 SSHCOMMAND:=ssh root@$(PLC)
 else
 ifdef PLCHOSTLXC
-SSHURL:=root@$(PLCHOSTLXC):/var/lib/lxc/$(GUESTNAME)/rootfs
+SSHURL:=root@$(PLCHOSTLXC):/vservers/$(GUESTNAME)
 SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME)
 else
 ifdef PLCHOSTVS
@@ -219,3 +219,13 @@ sfa/util/{sfalogging,faults,genicode,enumeration,__init__}.py
 clientlibsync: 
        @[ -d "$(CLIENTLIBTARGET)" ] || { echo "You need to set the make variable CLIENTLIBTARGET"; exit 1; }
        rsync -av --relative $(CLIENTLIBFILES) $(CLIENTLIBTARGET)
+
+#################### convenience, for debugging only
+# make +foo : prints the value of $(foo)
+# make ++foo : idem but verbose, i.e. foo=$(foo)
+++%: varname=$(subst +,,$@)
+++%:
+       @echo "$(varname)=$($(varname))"
++%: varname=$(subst +,,$@)
++%:
+       @echo "$($(varname))"