summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/common.mk b/common.mk
new file mode 100644
index 00000000..a0db5d70
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,22 @@
+topdir := $(dir $(lastword $(MAKEFILE_LIST)))
+www = $(topdir)/../web-cache/www
+
+#JSMIN = cp $1 $2
+#JSMIN = compiler $1
+#JSMIN = uglify-js -nc $1 > $2
+JSMIN = { sed -n '1,/\*\//p' $1; closure-compiler --js $1; } > $2
+
+%.min.js: %.js
+ $(call JSMIN,$<,$@)
+
+$(www)/http/%:
+ mkdir -p '$(@D)'
+ wget 'http://$*' -O '$@'
+ touch '$@'
+
+$(www)/https/%:
+ mkdir -p '$(@D)'
+ wget 'http://$*' -O '$@'
+ touch '$@'
+
+.PHONY: PHONY