-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
63 lines (41 loc) · 1.33 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
JSSOURCES=$(shell find bin lib -name '*.js' -print)
CPPSOURCES=$(shell echo src/*.{cc,h})
DOCDIRS=src lib
default: build test
install:
(unset tmp temp; npm i)
prepublish: lint doc test no-dos-endings check-coverage jstest-slow
lint: jslint cpplint doclint
cpplint:
./node_modules/.bin/node-cpplint $(CPPSOURCES)
jslint:
./node_modules/.bin/jslint --terse -- $(JSSOURCES) ; echo
doclint:
./node_modules/.bin/yuidoc $(DOCDIRS) --lint
test: cpptest jstest
test-slow: jstest-slow
jstest:
./node_modules/.bin/mocha
jstest-slow:
./node_modules/.bin/mocha -t 10000 -s 5000 test/slow
build:
(unset tmp temp; npm run-script build)
rebuild:
(unset tmp temp; npm run-script rebuild)
cpptest:
./build/Release/test
no-dos-endings:
file $(JSSOURCES) | grep -v CRLF > /dev/null
# coverage only for javascript at this point
cover: $(JSSOURCES)
./node_modules/.bin/istanbul cover --print=both ./node_modules/mocha/bin/_mocha --
check-coverage: cover
./node_modules/.bin/istanbul check-coverage --statements 90 --branches 90 --functions 90 --lines 90
doc:
./node_modules/.bin/yuidoc $(DOCDIRS)
tags:
find src deps | egrep "\.(c|h|cc|cpp)$\" | xargs etags
find src deps | egrep "\.(c|h|cc|cpp)$\" | xargs ebrowse
clean:
-find . -name "*~" | xargs rm
.PHONY: install jslint cpplint cpptest jstest doc no-dos-endings check-coverage build tags clean