X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=js%2FMakefile;h=effc48b0c16e51d44a2c781deb7bd51e9db5d67b;hb=d6f5dd9adfa8bccc7799396554dfaf80d9522a38;hp=d7e9959a975a2607b3b326cb6217a3dab200fb0b;hpb=fa3a9d0aecede2431e669ef33885a116f7d5f0be;p=Rakka.git diff --git a/js/Makefile b/js/Makefile index d7e9959..effc48b 100644 --- a/js/Makefile +++ b/js/Makefile @@ -1,34 +1,32 @@ +JQUERY_SOURCE = jquery-1.2.1.js +COMPRESSOR = yuicompressor-2.2.4.jar + SOURCES = \ - jquery-1.2.1.js \ + $(JQUERY_SOURCE) \ jquery-dom.js \ base.js \ editPage.js \ + redirection.js \ + screen.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) --warn -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: