diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2012-05-06 20:21:14 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2012-05-06 20:21:14 +0000 |
commit | 38f279ae46364bf079dbaa30a5c6cb80a47dd718 (patch) | |
tree | c9fe9b138f148d909477da5500f4b286bb186aae /media/Makefile | |
parent | 3d65a994502ff301f13ad153c5cd421c6bc1ea37 (diff) | |
parent | d71d0e9e9e97a1ca80bf2b81081b4b4db7fbea76 (diff) |
Merge branch 'master' of git://parabolagnulinux.org/parabolaweb
Diffstat (limited to 'media/Makefile')
-rw-r--r-- | media/Makefile | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/media/Makefile b/media/Makefile index 69016874..7c3ca10b 100644 --- a/media/Makefile +++ b/media/Makefile @@ -1,21 +1,38 @@ -all: d3.js d3.layout.js +d3version=2.6.1 +jqueryversion=1.4.4 -d3version=2.4.3 +# Force creating the d3 directory before we even evaluate how to make d3.js +all: .d3/d3-$(d3version) jquery-$(jqueryversion).min.js jquery.tablesorter.min.js + $(MAKE) d3.min.js d3.layout.min.js d3.geom.min.js -d3.%: .d3/d3-$(d3version) Makefile +%.min.js: %.js + $(closurecompiler) '$<' + +jquery-$(jqueryversion).js: + wget http://code.jquery.com/$@ + +d3.%: .d3/d3-$(d3version)/d3.% .d3/d3-$(d3version)/LICENSE Makefile echo '/* $@ - Data Driven Documents' > $@ echo ' * Version: $(d3version)' >> $@ echo ' * Homepage: http://mbostock.github.com/d3/' >> $@ echo ' * Copyright: 2010, Michael Bostock' >> $@ echo ' * Licence: 3-Clause BSD' >> $@ echo ' *' >> $@ - sed 's/./ * &/' $</LICENSE >> $@ + sed 's/.*/ * &/' $(<D)/LICENSE >> $@ echo ' */' >> $@ - cat $</$@ >> $@ + cat $< >> $@ + .d3/d3-%.tar.gz: Makefile mkdir -p $(@D) wget https://github.com/mbostock/d3/tarball/v$* -O $@ -.d3/d3-%: .d3/d3-%.tar.gz Makefile +.d3/d3-%.tar.gz.d: .d3/d3-%.tar.gz Makefile + rm -rf $@ mkdir -p $<.d - cd $<.d && tar xzf ../d3-$*.tar.gz - mv $<.d/*/ $@ + cd $@ && tar xzf ../d3-$*.tar.gz +.d3/d3-%: .d3/d3-%.tar.gz.d Makefile + rm -rf $@ + cp -r $</*/ $@ + rm $@/*.min.js + +.SECONDARY: +closurecompiler=compiler() { cp "$$1" "$${1%.js}.min.js"; }; compiler |