Setting tag www-register-wizard-4.3-4
[www-register-wizard.git] / Makefile
1 # refresh tags
2 tags:
3         find . '(' -name '*.php' -o -name '*.js' -o -name '*.css' -o -name Makefile ')' | xargs etags
4
5 .PHONY: tags
6
7 ########## sync
8 # 2 forms are supported
9 # (*) if your plc root context has direct ssh access:
10 # make sync PLC=boot.planet-lab.eu
11 # (*) otherwise, entering through the root context
12 # make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr
13
14 PLCHOST ?= testplc.onelab.eu
15
16 ifdef GUEST
17 SSHURL:=root@$(PLCHOST):/vservers/$(GUEST)
18 SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST)
19 endif
20 ifdef PLC
21 SSHURL:=root@$(PLC):/
22 SSHCOMMAND:=ssh root@$(PLC)
23 endif
24
25 LOCAL_RSYNC_EXCLUDES    := --exclude '*.pyc' 
26 RSYNC_EXCLUDES          := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
27 RSYNC_COND_DRY_RUN      := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
28 RSYNC                   := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
29
30 sync:
31 ifeq (,$(SSHURL))
32         @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line"
33         @echo "  e.g. make sync PLC=boot.planet-lab.eu"
34         @echo "  or   make sync PLCHOST=testplc.onelab.eu GUEST=vplc03.inria.fr"
35         @exit 1
36 else
37         +$(RSYNC) ./ $(SSHURL)/var/www/html/registerwizard/
38 endif
39
40 #################### convenience, for debugging only
41 # make +foo : prints the value of $(foo)
42 # make ++foo : idem but verbose, i.e. foo=$(foo)
43 ++%: varname=$(subst +,,$@)
44 ++%:
45         @echo "$(varname)=$($(varname))"
46 +%: varname=$(subst +,,$@)
47 +%:
48         @echo "$($(varname))"