2014-04-14 20:45:36 +00:00
|
|
|
SHELL=/bin/bash
|
|
|
|
VOC=voc
|
|
|
|
TARGETS=cptable.js cputils.js cpexcel.js sbcs.js
|
|
|
|
|
|
|
|
.PHONY: js voc
|
|
|
|
voc test.js: codepage.md
|
|
|
|
$(VOC) codepage.md
|
|
|
|
|
2014-04-22 23:02:59 +00:00
|
|
|
js: make.sh codepage.md
|
2014-04-14 20:45:36 +00:00
|
|
|
bash make.sh <(awk -F, '$$3=="1"' pages.csv) sbcs.js cptable
|
|
|
|
bash make.sh excel.csv cpexcel.js cptable
|
|
|
|
bash make.sh
|
|
|
|
|
|
|
|
.PHONY: init
|
|
|
|
init:
|
|
|
|
bash misc/init.sh
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2016-01-16 03:27:02 +00:00
|
|
|
rm -f make.sh .vocrc pages.csv bits/*.js
|
2014-04-14 20:45:36 +00:00
|
|
|
|
|
|
|
.PHONY: test mocha
|
|
|
|
test mocha: test.js
|
|
|
|
mocha -R spec
|
|
|
|
|
2014-06-26 05:54:13 +00:00
|
|
|
.PHONY: prof
|
|
|
|
prof:
|
|
|
|
cat misc/prof.js test.js > prof.js
|
|
|
|
node --prof prof.js
|
|
|
|
|
2014-04-14 20:45:36 +00:00
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
|
|
|
jshint --show-non-errors $(TARGETS)
|
2014-06-26 05:54:13 +00:00
|
|
|
jscs $(TARGETS)
|
2014-04-14 20:45:36 +00:00
|
|
|
|
2014-06-27 13:43:31 +00:00
|
|
|
.PHONY: ctest
|
|
|
|
ctest:
|
|
|
|
bash ctest/fixtures.sh
|
|
|
|
|
2014-04-14 20:45:36 +00:00
|
|
|
.PHONY: cov cov-spin
|
|
|
|
cov: misc/coverage.html
|
|
|
|
cov-spin:
|
|
|
|
make cov & bash misc/spin.sh $$!
|
|
|
|
|
|
|
|
misc/coverage.html: test.js
|
|
|
|
mocha --require blanket -R html-cov > $@
|
|
|
|
|
|
|
|
.PHONY: coveralls coveralls-spin
|
|
|
|
coveralls:
|
|
|
|
mocha --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
|
|
|
|
|
|
|
|
coveralls-spin:
|
|
|
|
make coveralls & bash misc/spin.sh $$!
|
2014-04-22 23:02:59 +00:00
|
|
|
|
|
|
|
.PHONY: dist
|
|
|
|
dist: dist/cpexcel.full.js dist/cptable.full.js dist/sbcs.full.js
|
|
|
|
cp $(TARGETS) dist/
|
|
|
|
cp LICENSE dist/
|
|
|
|
|
|
|
|
.PHONY: dist/cpexcel.full.js dist/cptable.full.js dist/sbcs.full.js
|
|
|
|
dist/cpexcel.full.js dist/cptable.full.js dist/sbcs.full.js : dist/%.full.js: %.js cputils.js
|
|
|
|
cat $^ > $@
|