]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/Makefile
preparation for javascripts
[Rakka.git] / js / Makefile
diff --git a/js/Makefile b/js/Makefile
new file mode 100644 (file)
index 0000000..a5c163b
--- /dev/null
@@ -0,0 +1,29 @@
+SOURCES = \
+       jquery-1.2.1.js \
+       $(NULL)
+
+
+build: ../Rakka/Resource/JavaScript.hs
+
+
+../Rakka/Resource/JavaScript.hs: $(SOURCES) yuicompressor.jar
+       cat $(SOURCES) > tmp.js
+       java -jar yuicompressor.jar --type js --charset UTF-8 -o tmp.packed.js --warn tmp.js
+       lucu-implant-file -o $@ -m Rakka.Resource.JavaScript -t text/javascript tmp.packed.js
+       rm tmp.js tmp.packed.js
+
+
+jquery-%.js:
+       @echo "Error: $@ has to be placed on this directory."
+       @echo "       See http://jquery.com/"
+       @exit 1
+
+
+clean:
+       rm -f ../Rakka/Resource/JavaScript.hs
+
+
+yuicompressor.jar:
+       @echo "Error: yuicompressor.jar has to be placed on this directory."
+       @echo "       See http://www.julienlecomte.net/yuicompressor/"
+       @exit 1