forked from C2FO/patio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·42 lines (29 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
PREFIX ?= /usr/local
PWD = `pwd`
JSCOV = support/jscoverage/node-jscoverage
BENCHMARKS = `find benchmark -name *benchmark.js `
DOC_COMMAND=coddoc -f multi-html -d ./lib --dir ./docs
test:
export NODE_PATH=lib:$(NODE_PATH) && export NODE_ENV=test \
&& export PATIO_DB=mysql && ./node_modules/it/bin/it -r dotmatrix \
&& export PATIO_DB=pg && ./node_modules/it/bin/it -r dotmatrix
test-coverage:
rm -rf ./lib-cov && node-jscoverage ./lib ./lib-cov && export NODE_PATH=lib-cov:$(NODE_PATH) && export NODE_ENV=test \
&& export PATIO_DB=mysql && ./node_modules/it/bin/it -r dotmatrix --cov-html ./docs-md/coverage.html \
&& export PATIO_DB=pg && ./node_modules/it/bin/it -r dotmatrix --cov-html ./docs-md/coverage.html
docs: docclean
$(DOC_COMMAND)
docclean :
rm -rf docs/*
benchmarks:
for file in $(BENCHMARKS) ; do \
node $$file ; \
done
install: install-jscov
install-jscov: $(JSCOV)
install $(JSCOV) $(PREFIX)/bin
$(JSCOV):
cd support/jscoverage && ./configure && make && mv jscoverage node-jscoverage
uninstall:
rm -f $(PREFIX)/bin/node-jscoverage
.PHONY: install install-jscov test docs docclean uninstall