summaryrefslogtreecommitdiff
path: root/media/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'media/Makefile')
-rw-r--r--media/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/media/Makefile b/media/Makefile
new file mode 100644
index 00000000..a9a1efcc
--- /dev/null
+++ b/media/Makefile
@@ -0,0 +1,21 @@
+all: d3.js d3.layout.js
+
+d3version=2.7.0
+
+d3.%: .d3/d3-$(d3version)
+ 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 >> $@
+ echo ' */' >> $@
+ cat $</$@ >> $@
+.d3/d3-%.tar.gz:
+ mkdir -p $(@D)
+ wget https://github.com/mbostock/d3/tarball/v$* -O $@
+.d3/d3-%: .d3/d3-%.tar.gz
+ mkdir -p $<.d
+ cd $<.d && tar xzf ../d3-$*.tar.gz
+ mv $<.d/*/ $@ \ No newline at end of file