- minify javascripts with jsmin at compile time
[plewww.git] / Makefile
index d1c2f44..af4b4da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,9 +34,17 @@ ifeq (,$(SSHURL))
        @echo "  or   make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr"
        @exit 1
 else
-       +$(RSYNC) planetlab modules $(SSHURL)/var/www/html/
+       +$(RSYNC) planetlab plekit modules $(SSHURL)/var/www/html/
 endif
 
+compress:
+       $(foreach file,\
+               $(shell find . -type f -iname "*.js"),\
+               $(shell python 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)