diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-06-23 16:44:37 -0600 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-07-14 14:43:10 -0600 |
commit | bfc73c05c1be186d50146027f523f7f577d7affe (patch) | |
tree | 0610ab5aa7c811a77eba0f96fd9e28def314645c /visualize/static/Makefile | |
parent | 66ebed7043371ba52138e42335509116529f928f (diff) |
js makefiles
Diffstat (limited to 'visualize/static/Makefile')
-rw-r--r-- | visualize/static/Makefile | 64 |
1 files changed, 23 insertions, 41 deletions
diff --git a/visualize/static/Makefile b/visualize/static/Makefile index 4fa99a20..9a7f9828 100644 --- a/visualize/static/Makefile +++ b/visualize/static/Makefile @@ -1,41 +1,23 @@ -d3version=2.8.1 - -targets=d3.v2.js d3.v2.min.js -gitignore=.d3 - -# Force creating the d3 directory before we even evaluate how to make d3.js -all: .d3/d3-$(d3version) .gitignore - $(MAKE) $(targets) - -distclean-hook: PHONY - rm -rf .d3 - -#### - -d3.%: .d3/d3-$(d3version)/d3.% .d3/d3-$(d3version)/LICENSE Makefile - @echo '[D3-HEADER] > $@' - @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 +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 $< ;} > $@ |