diff options
Diffstat (limited to 'visualize/static/Makefile')
-rw-r--r-- | visualize/static/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/visualize/static/Makefile b/visualize/static/Makefile new file mode 100644 index 00000000..f68ecc4b --- /dev/null +++ b/visualize/static/Makefile @@ -0,0 +1,31 @@ +d3version=2.6.1 + +# Force creating the d3 directory before we even evaluate how to make d3.js +all: .d3/d3-$(d3version) + $(MAKE) d3.min.js d3.layout.min.js d3.geom.min.js + +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/.*/ * &/' $(<D)/LICENSE >> $@ + echo ' */' >> $@ + cat $< >> $@ + +.d3/d3-%.tar.gz: Makefile + mkdir -p $(@D) + wget https://github.com/mbostock/d3/tarball/v$* -O $@ +.d3/d3-%.tar.gz.d: .d3/d3-%.tar.gz Makefile + rm -rf $@ + mkdir -p $<.d + cd $@ && tar xzf ../d3-$*.tar.gz +.d3/d3-%: .d3/d3-%.tar.gz.d Makefile + rm -rf $@ + cp -r $</*/ $@ + rm $@/*.min.js + +include ../../sitestatic/js.mk +.SECONDARY: |