]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/Makefile
jQuery 1.2.2 -> 1.2.6
[Rakka.git] / js / Makefile
index d7e9959a975a2607b3b326cb6217a3dab200fb0b..ccd88fb2accf85687721a821afe2c5df0019163c 100644 (file)
@@ -1,37 +1,42 @@
+JQUERY_SOURCE = jquery-1.2.6.js
+COMPRESSOR    = yuicompressor-2.3.5.jar
+
 SOURCES = \
-       jquery-1.2.1.js \
+       $(JQUERY_SOURCE) \
        jquery-dom.js \
        base.js \
+       base64.js \
        editPage.js \
+       localFile.js \
+       login.js \
+       redirection.js \
+       parseuri.js \
+       screen.js \
+       search.js \
+       systemConfig.js \
+       uri.js \
        $(NULL)
 
-
-build: ../Rakka/Resource/JavaScript.hs
+COMPRESS = java -jar $(COMPRESSOR) --type js --charset UTF-8
 
 
-../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
+build: ../Rakka/Resource/JavaScript.hs
 
 
-jquery-dom.js:
-       @echo "Warning: jquery-dom.js is missing. Trying to download it..."
-       wget http://mg.to/files/jquery-dom.js
+packed.js: $(SOURCES) $(COMPRESSOR)
+       cat $(SOURCES) > $@
+#      cat $(SOURCES) | $(COMPRESS) -o $@
 
 
-jquery-%.js:
-       @echo "Error: $@ has to be placed on this directory."
-       @echo "       See http://jquery.com/"
-       @exit 1
+../Rakka/Resource/JavaScript.hs: packed.js
+       lucu-implant-file -o $@ -m Rakka.Resource.JavaScript -t text/javascript packed.js
 
 
 clean:
-       rm -f ../Rakka/Resource/JavaScript.hs
+       rm -f ../Rakka/Resource/JavaScript.hs packed.js $(JQUERY_PACKED)
 
 
-yuicompressor.jar:
-       @echo "Error: yuicompressor.jar has to be placed on this directory."
+$(COMPRESSOR):
+       @echo "Error: $(COMPRESSOR) has to be placed on this directory."
        @echo "       See http://www.julienlecomte.net/yuicompressor/"
        @exit 1