Serves javascript file from a per-version directory, to prevent cross-version caching...
[platal.git] / Makefile
index ba24d7e..3233b9f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ endef
 
 all: build
 
-build: core conf banana wiki openid medals jquery
+build: core conf static banana wiki openid medals jquery
 
 q:
        @echo -e "Code statistics\n"
@@ -62,6 +62,14 @@ htdocs/.htaccess: htdocs/.htaccess.in Makefile
        sed -e "s,@REWRITE_BASE@,$$REWRITE_BASE,g" $< > $@
 
 ##
+## static content
+##
+static: htdocs/javascript@VERSION
+
+%@VERSION: % Makefile ChangeLog
+       cd $< && rm -f $(VERSION) && ln -sf . $(VERSION)
+
+##
 ## wiki
 ##