forked from Sannis/node-mysql-libmysqlclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (65 loc) · 2.63 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
CURR_HEAD_SHA := $(firstword $(shell git show-ref --hash HEAD | cut -b -6) master)
GITHUB_PROJECT_NAME := Sannis/node-mysql-libmysqlclient
GITHUB_PROJECT_URL := https://github.com/${GITHUB_PROJECT_NAME}
API_SRC_URL_FMT := https://github.com/${GITHUB_PROJECT_NAME}/blob/${CURR_HEAD_SHA}/{file}\#L{line}
API_DEST_DIR := ./doc/api
MLF=./tools/run-memoryleaks-finder.js
NI=./node_modules/.bin/node-inspector
NI_DEBUG_PORT=5858
NI_WEB_PORT=8888
WEB_BROWSER=google-chrome
all: npm-install
npm-install: npm-install-stamp
npm-install-stamp: ./binding.gyp ./src/*
npm install
touch npm-install-stamp
clean:
rm -rf ./build
rm -f ./mysql_bindings.node
rm -f npm-install-stamp
rm -f webkit-devtools-agent-stamp
clean-all: clean
rm -rf ./node_modules
test: npm-install
./node_modules/.bin/nodeunit --reporter=minimal tests/low-level-sync tests/low-level-async \
tests/high-level tests/complex tests/issues
test-slow: npm-install
./node_modules/.bin/nodeunit --reporter=minimal tests/slow
test-all: npm-install
./node_modules/.bin/nodeunit --reporter=minimal tests/low-level-sync tests/low-level-async \
tests/high-level tests/complex tests/issues \
tests/slow
test-profile: npm-install
rm -f v8.log
/usr/bin/env node --prof ./node_modules/.bin/nodeunit tests/low-level-sync tests/low-level-async \
tests/high-level tests/complex tests/issues
/usr/bin/env linux-tick-processor v8.log > v8.processed.log
lint: npm-install
cpplint ./src/*.h ./src/*.cc
./node_modules/.bin/nodelint --config ./nodelint.conf ./package.json ./lib ./tools/*.js
./node_modules/.bin/nodelint --config ./nodelint.conf ./tests
webkit-devtools-agent: webkit-devtools-agent-stamp
webkit-devtools-agent-stamp:
npm install [email protected]
touch webkit-devtools-agent-stamp
mlf: npm-install webkit-devtools-agent
./tools/memory-leaks-finder-repl.js
valgrind: npm-install webkit-devtools-agent $(shell time)
valgrind \
--leak-check=full --error-limit=no \
--track-origins=yes -v \
--log-file=valgrind.log -- \
node --expose-gc ./tools/memory-usage-show.js
doc: ./lib/* ./src/*
rm -rf ${API_DEST_DIR}
./node_modules/.bin/ndoc \
--gh-ribbon ${GITHUB_PROJECT_URL} \
--link-format ${API_SRC_URL_FMT} \
--output ${API_DEST_DIR} \
--alias cc:js \
--alias h:js \
./lib/*.js ./src/*.cc ./src/*.h
gh-pages:
./gh_pages.sh
.PHONY: all npm-install clean clean-all test test-slow test-all test-profile lint mlf doc