- minify javascripts with jsmin at compile time
[plewww.git] / Makefile
index 6f15a95..af4b4da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,14 @@ else
        +$(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)