Merge branch 'master' of ssh://git.onelab.eu/git/sfa-gui
[sfa-gui.git] / Makefile
1 # dev targets
2
3 tags: 
4         find . -name '*.py' -o -name '*.html' -o -name '*.css' | xargs etags
5
6 clean:
7         rm -f TAGS
8
9 .PHONY: tags clean
10
11 ##############################
12 # REMOTE is expected to be a ssh url like user@hostname 
13
14 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
15 RSYNC_EXCLUDES          := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
16 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
17 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
18
19 sync:
20 ifeq (,$(REMOTE))
21         @echo "sync: You must define REMOTE"
22         @echo "  e.g. make sync REMOTE=thierry@sfaui.pl.sophia.inria.fr:SFA-GUI"
23         @exit 1
24 else
25         +$(RSYNC) . $(REMOTE)
26 endif
27
28 .PHONY: sync
29 ##############################