]> gitweb @ CieloNegro.org - Rakka.git/blob - js/Makefile
d7e9959a975a2607b3b326cb6217a3dab200fb0b
[Rakka.git] / js / Makefile
1 SOURCES = \
2         jquery-1.2.1.js \
3         jquery-dom.js \
4         base.js \
5         editPage.js \
6         $(NULL)
7
8
9 build: ../Rakka/Resource/JavaScript.hs
10
11
12 ../Rakka/Resource/JavaScript.hs: $(SOURCES) yuicompressor.jar
13         cat $(SOURCES) > tmp.js
14         java -jar yuicompressor.jar --type js --charset UTF-8 -o tmp.packed.js --warn tmp.js
15         lucu-implant-file -o $@ -m Rakka.Resource.JavaScript -t text/javascript tmp.packed.js
16         rm tmp.js tmp.packed.js
17
18
19 jquery-dom.js:
20         @echo "Warning: jquery-dom.js is missing. Trying to download it..."
21         wget http://mg.to/files/jquery-dom.js
22
23
24 jquery-%.js:
25         @echo "Error: $@ has to be placed on this directory."
26         @echo "       See http://jquery.com/"
27         @exit 1
28
29
30 clean:
31         rm -f ../Rakka/Resource/JavaScript.hs
32
33
34 yuicompressor.jar:
35         @echo "Error: yuicompressor.jar has to be placed on this directory."
36         @echo "       See http://www.julienlecomte.net/yuicompressor/"
37         @exit 1