2012-08-07 23:19:18 +04:00
|
|
|
LOCALE ?= en_US
|
2010-09-28 22:26:55 +04:00
|
|
|
|
2013-04-25 22:48:02 +04:00
|
|
|
GENERATED_FILES = \
|
2012-10-06 05:46:05 +04:00
|
|
|
d3.js \
|
|
|
|
d3.min.js \
|
2013-06-29 20:03:09 +04:00
|
|
|
src/format/format-localized.js \
|
|
|
|
src/time/format-localized.js \
|
2013-06-29 20:24:41 +04:00
|
|
|
bower.json \
|
|
|
|
component.json
|
2013-04-25 22:48:02 +04:00
|
|
|
|
|
|
|
all: $(GENERATED_FILES)
|
2010-09-28 22:26:55 +04:00
|
|
|
|
2013-03-16 04:15:07 +04:00
|
|
|
.PHONY: clean all test
|
|
|
|
|
|
|
|
test:
|
2013-03-15 01:32:13 +04:00
|
|
|
@npm test
|
2011-03-05 02:25:09 +03:00
|
|
|
|
2012-11-21 19:22:57 +04:00
|
|
|
benchmark: all
|
|
|
|
@node test/geo/benchmark.js
|
|
|
|
|
2013-05-05 03:48:59 +04:00
|
|
|
src/format/format-localized.js: bin/locale src/format/format-locale.js
|
2013-07-06 02:39:56 +04:00
|
|
|
LC_NUMERIC=$(LOCALE) LC_MONETARY=$(LOCALE) locale -ck LC_NUMERIC LC_MONETARY | bin/locale src/format/format-locale.js > $@
|
2010-09-28 22:26:55 +04:00
|
|
|
|
2013-05-05 03:48:59 +04:00
|
|
|
src/time/format-localized.js: bin/locale src/time/format-locale.js
|
|
|
|
LC_TIME=$(LOCALE) locale -ck LC_TIME | bin/locale src/time/format-locale.js > $@
|
|
|
|
|
|
|
|
src/start.js: package.json bin/start
|
|
|
|
bin/start > $@
|
2013-03-13 08:01:49 +04:00
|
|
|
|
2013-05-01 02:52:32 +04:00
|
|
|
d3.js: $(shell node_modules/.bin/smash --list src/d3.js) package.json
|
2010-11-05 08:27:21 +03:00
|
|
|
@rm -f $@
|
2013-05-05 03:48:59 +04:00
|
|
|
node_modules/.bin/smash src/d3.js | node_modules/.bin/uglifyjs - -b indent-level=2 -o $@
|
2010-11-05 08:27:21 +03:00
|
|
|
@chmod a-w $@
|
2010-09-28 22:26:55 +04:00
|
|
|
|
2013-08-12 19:17:45 +04:00
|
|
|
d3.min.js: d3.js bin/uglify
|
2013-03-13 08:01:49 +04:00
|
|
|
@rm -f $@
|
2013-05-24 23:37:58 +04:00
|
|
|
bin/uglify $< > $@
|
2013-03-13 08:01:49 +04:00
|
|
|
|
2013-06-29 20:24:41 +04:00
|
|
|
%.json: bin/% package.json
|
2012-09-14 23:38:35 +04:00
|
|
|
@rm -f $@
|
2013-06-29 20:24:41 +04:00
|
|
|
bin/$* > $@
|
2012-09-14 23:38:35 +04:00
|
|
|
@chmod a-w $@
|
|
|
|
|
2010-09-28 22:26:55 +04:00
|
|
|
clean:
|
2013-04-25 23:33:06 +04:00
|
|
|
rm -f -- $(GENERATED_FILES)
|