File: Makefile

package info (click to toggle)
node-assert-plus 1.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 156 kB
  • sloc: javascript: 558; makefile: 32
file content (52 lines) | stat: -rw-r--r-- 1,030 bytes parent folder | download | duplicates (3)
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
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

#
# Copyright 2015, Joyent, Inc.
#

NPM = npm

JS_FILES	:= $(shell find assert.js tests/ -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/$*