-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (33 loc) · 897 Bytes
/
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
NODE = node
NODE_OPTS =
TEST_OPTS =
NODE_GYP = npm --ignore-scripts false run node-gyp
love:
@echo "Feel like makin' love."
build: binding.gyp
$(NODE_GYP) configure
compile: build
$(MAKE) -C build
test: compile
@$(NODE) $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS)
spec: compile
@$(NODE) $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS)
autotest: compile
@$(NODE) $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS)
autospec: compile
@$(NODE) $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS)
pack:
@file=$$(npm pack); echo "$$file"; tar tf "$$file"
publish:
npm publish
tag:
git tag "v$$($(NODE) -e 'console.log(require("./package").version)')"
clean:
rm -f *.tgz
npm prune --production
$(NODE_GYP) clean
.PHONY: love
.PHONY: compile
.PHONY: test spec autotest autospec
.PHONY: pack publish tag
.PHONY: clean