summaryrefslogtreecommitdiff
path: root/visualize
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-07-14 15:04:01 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-07-14 15:04:01 -0600
commit7ccccb7abbf0f7a393fea8d3334abdbf2025db62 (patch)
treed5a6fedb84d32c7bf7b5b029a0cecca4d167bac4 /visualize
parentf6b335b268f5f47e5c48f84f5994f7bdcd8b7e5a (diff)
Add Makefiles to download .js files, and generate .min.js files.
Diffstat (limited to 'visualize')
-rw-r--r--visualize/static/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/visualize/static/Makefile b/visualize/static/Makefile
new file mode 100644
index 00000000..9a7f9828
--- /dev/null
+++ b/visualize/static/Makefile
@@ -0,0 +1,23 @@
+include ../../common.mk
+
+d3-ver=3.0.6
+targets = d3-$(d3-ver)
+
+target-files=$(addsuffix .js,$(targets)) $(addsuffix .min.js,$(targets))
+all: $(target-files)
+clean:
+ rm -f -- $(target-files)
+
+d3-$(d3-ver).js: %: \
+ $(www)/https/raw.github.com/mbostock/d3/v$(d3-ver)/d3.js \
+ $(www)/https/raw.github.com/mbostock/d3/v$(d3-ver)/LICENSE
+ { \
+ echo '/*! $@ - Data Driven Documents' && \
+ echo ' * Version: $(d3-ver)' && \
+ echo ' * Homepage: http://mbostock.github.com/d3/' && \
+ echo ' * Copyright: 2012, Michael Bostock' && \
+ echo ' * Licence: 3-Clause BSD' && \
+ echo ' *' && \
+ sed 's/.*/ * &/' $(<D)/LICENSE && \
+ echo ' */' && \
+ cat $< ;} > $@