forked from pfmooney/node-ldap-filter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (29 loc) · 786 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
NPM = npm
JS_FILES := $(shell find lib test -name '*.js')
JSL_CONF = tools/jsl.node.conf
JSSTYLE_FLAGS = -f tools/jsstyle.conf
JSL_EXEC ?= deps/javascriptlint/build/install/jsl
JSSTYLE_EXEC ?= deps/jsstyle/jsstyle
JSL ?= $(JSL_EXEC)
JSSTYLE ?= $(JSSTYLE_EXEC)
.PHONY: install
install:
$(NPM) install
.PHONY: clean
clean:
rm -rf node_modules coverage
.PHONY: test
test: install
$(NPM) test
.PHONY: check
check: $(JSL_EXEC) $(JSSTYLE_EXEC)
$(JSL) --conf $(JSL_CONF) $(JS_FILES)
$(JSSTYLE) $(JSSTYLE_FLAGS) $(JS_FILES)
.PHONY: prepush
prepush: check test
$(JSL_EXEC): | deps/javascriptlint/.git
cd deps/javascriptlint && make install
$(JSSTYLE_EXEC): | deps/jsstyle/.git
.SECONDARY: $($(wildcard deps/*):%=%/.git)
deps/%/.git:
git submodule update --init deps/$*