X-Git-Url: http://git.onelab.eu/?p=plewww.git;a=blobdiff_plain;f=Makefile;h=d400e2cbc07e374886faa501a47bec2e6129d199;hp=d1c2f44708b174e934de177f4b939d42e382eff1;hb=HEAD;hpb=13f1390a55a79b7e3ef6d0558ea070c88bd06cb4 diff --git a/Makefile b/Makefile index d1c2f44..aa1aed4 100644 --- a/Makefile +++ b/Makefile @@ -8,35 +8,50 @@ tags: # 2 forms are supported # (*) if your plc root context has direct ssh access: # make sync PLC=private.one-lab.org -# (*) otherwise, entering through the root context -# make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr +# (*) otherwise, for test deployments, use on your testmaster +# $ run export +# and cut'n paste the export lines before you run make sync -ifdef GUEST -ifdef PLCHOST -SSHURL:=root@$(PLCHOST):/vservers/$(GUEST) -SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST) -endif -endif ifdef PLC SSHURL:=root@$(PLC):/ SSHCOMMAND:=ssh root@$(PLC) +else +ifdef PLCHOSTLXC +SSHURL:=root@$(PLCHOSTLXC):/vservers/$(GUESTNAME) +SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME) +else +ifdef PLCHOSTVS +SSHURL:=root@$(PLCHOSTVS):/vservers/$(GUESTNAME) +SSHCOMMAND:=ssh root@$(PLCHOSTVS) vserver $(GUESTNAME) exec +endif +endif endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' -RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) +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 (,$(SSHURL)) - @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line" - @echo " e.g. make sync PLC=private.one-lab.org" - @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr" + @echo "sync: I need more info from the command line, e.g." + @echo " make sync PLC=boot.planetlab.eu" + @echo " make sync PLCHOSTVS=.. GUESTNAME=.." + @echo " make sync PLCHOSTLXC=.. GUESTNAME=.. GUESTHOSTNAME=.." @exit 1 else - +$(RSYNC) planetlab modules $(SSHURL)/var/www/html/ + +$(RSYNC) planetlab plekit modules $(SSHURL)/var/www/html/ + +$(RSYNC) drupal-hacks/*.module $(SSHURL)/var/www/html/modules/ endif +compress: + $(foreach file,\ + $(shell find . -type f -iname "*.js" | grep -v datepicker.js | grep -v raphael),\ + $(shell python2 jsmin.py < $(file) > $(file).new && mv $(file).new $(file))) + @echo "Compressed .js files with jsmin.py" + +.PHONY: compress + #################### convenience, for debugging only # make +foo : prints the value of $(foo) # make ++foo : idem but verbose, i.e. foo=$(foo)