From: Thierry Parmentelat Date: Tue, 7 Sep 2010 13:15:34 +0000 (+0200) Subject: the tags and sync targets X-Git-Url: http://git.onelab.eu/?p=sfa-gui.git;a=commitdiff_plain;h=e35dc7ce48e725582c1cdcdf5dcad686eff105e7 the tags and sync targets --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b4e260 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +# dev targets + +tags: + find . -name '*.py' -o -name '*.html' -o -name '*.css' | xargs etags + +clean: + rm -f TAGS + +.PHONY: tags clean + +############################## +# REMOTE is expected to be a ssh url like user@hostname + +LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' +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) $(RSYNC_EXCLUDES) + +sync: +ifeq (,$(REMOTE)) + @echo "sync: You must define REMOTE" + @echo " e.g. make sync REMOTE=thierry@sfaui.pl.sophia.inria.fr:SFA-GUI" + @exit 1 +else + +$(RSYNC) . $(REMOTE) +endif + +.PHONY: sync +##############################