X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=9d9c83189edcec47dbefb5d80e2d93e47d1036c0;hb=364be2820af7d3c17da96edea8e6f398ff7070a3;hp=eaa6b3c7e04409856d64ad4af57a8dd77dfcc3a7;hpb=68b79944ded5b0eb71d7a00dc7200e20cfda5c32;p=sfa.git diff --git a/Makefile b/Makefile index eaa6b3c7..9d9c8318 100644 --- a/Makefile +++ b/Makefile @@ -5,18 +5,25 @@ DESTDIR="/" ########## -all: python wsdl +all: python wsdl -install: python-install wsdl-install xmlbuilder-install +install: python-install wsdl-install xmlbuilder-install tests-install -clean: python-clean wsdl-clean +clean: python-clean wsdl-clean -uninstall: python-uninstall +uninstall: python-uninstall tests-uninstall -.PHONY: all install clean +.PHONY: all install clean uninstall + +VERSIONTAG=should-be-redefined-by-specfile +SCMURL=should-be-redefined-by-specfile ########## -python: +python: version + +version: sfa/util/version.py +sfa/util/version.py: sfa/util/version.py.in + 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 --root=$(DESTDIR) && cd - @@ -25,11 +32,14 @@ python-install: python setup.py install --root=$(DESTDIR) chmod 444 $(DESTDIR)/etc/sfa/default_config.xml -python-clean: +python-clean: version-clean python setup.py clean - rm $(init) +# rm $(init) -.PHONY: python python-install python-clean xmlbuilder-install +version-clean: + rm -f sfa/util/version.py + +.PHONY: python version python-install python-clean version-clean xmlbuilder-install ########## wsdl: $(MAKE) -C wsdl @@ -43,6 +53,16 @@ wsdl-clean: .PHONY: wsdl wsdl-install wsdl-clean +########## +tests-install: + mkdir -p $(DESTDIR)/usr/share/sfa/tests + install -m 755 tests/*.py $(DESTDIR)/usr/share/sfa/tests/ + +tests-uninstall: + rm -rf $(DESTDIR)/usr/share/sfa/tests + +.PHONY: tests-install tests-uninstall + ########## refreshing methods package metafile # Metafiles - manage Legacy/ and Accessors by hand init := sfa/methods/__init__.py @@ -67,7 +87,7 @@ force: ########## tags: - find . -type f | egrep -v '/\.git/|/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$|~$$' | xargs etags + find . -type f | egrep -v '/\.git/|/\.svn/|TAGS|\.py[co]$$|\.doc$$|\.html$$|\.pdf$$|~$$|\.png$$|\.svg$$|\.out$$' | xargs etags .PHONY: tags signatures: @@ -94,15 +114,19 @@ SSHURL:=root@$(PLC):/ SSHCOMMAND:=ssh root@$(PLC) endif -LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' +LOCAL_RSYNC_EXCLUDES += --exclude '*.pyc' +LOCAL_RSYNC_EXCLUDES += --exclude '*.png' --exclude '*.svg' --exclude '*.out' RSYNC_EXCLUDES := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) --no-owner $(RSYNC_EXCLUDES) +CLIENTS = sfi.py getNodes.py getRecord.py setRecord.py \ +sfiAddAttribute.py sfiAddSliver.py sfiDeleteAttribute.py sfiDeleteSliver.py sfiListNodes.py \ +sfiListSlivers.py sfadump.py + BINS = ./config/sfa-config-tty ./config/gen-sfa-cm-config.py \ ./sfa/plc/sfa-import-plc.py ./sfa/plc/sfa-nuke-plc.py ./sfa/server/sfa-server.py \ - ./sfa/client/sfi.py ./sfa/client/getNodes.py ./sfa/client/getRecord.py \ - ./sfa/client/setRecord.py ./sfa/client/sfadump.py + $(foreach client,$(CLIENTS),./sfa/client/$(client)) sync: ifeq (,$(SSHURL))