| 1 |
# |
| 2 |
# This Source Code Form is subject to the terms of the Mozilla Public |
| 3 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 |
# |
| 6 |
|
| 7 |
# |
| 8 |
# Copyright 2019, Joyent, Inc. |
| 9 |
# |
| 10 |
|
| 11 |
# |
| 12 |
# node-asn1 Makefile |
| 13 |
# |
| 14 |
|
| 15 |
# |
| 16 |
# Tools |
| 17 |
# |
| 18 |
|
| 19 |
ISTANBUL := node_modules/.bin/istanbul |
| 20 |
FAUCET := node_modules/.bin/faucet |
| 21 |
NODE := node |
| 22 |
NPM := npm |
| 23 |
|
| 24 |
# |
| 25 |
# Files |
| 26 |
# |
| 27 |
|
| 28 |
JS_FILES := $(shell find lib test -name '*.js') |
| 29 |
JSSTYLE_FILES = $(JS_FILES) |
| 30 |
JSSTYLE_FLAGS = -f tools/jsstyle.conf |
| 31 |
ESLINT = ./node_modules/.bin/eslint |
| 32 |
ESLINT_FILES = $(JS_FILES) |
| 33 |
|
| 34 |
include ./tools/mk/Makefile.defs |
| 35 |
include ./tools/mk/Makefile.smf.defs |
| 36 |
|
| 37 |
# |
| 38 |
# Repo-specific targets |
| 39 |
# |
| 40 |
|
| 41 |
.PHONY: all |
| 42 |
all: $(TAPE) |
| 43 |
$(NPM) rebuild |
| 44 |
|
| 45 |
$(ISTANBUL): | $(NPM_EXEC) |
| 46 |
$(NPM) install |
| 47 |
|
| 48 |
$(FAUCET): | $(NPM_EXEC) |
| 49 |
$(NPM) install |
| 50 |
|
| 51 |
CLEAN_FILES += ./node_modules/ |
| 52 |
|
| 53 |
.PHONY: test |
| 54 |
test: $(ISTANBUL) $(FAUCET) |
| 55 |
$(ISTANBUL) cover --print none test/run.js | $(FAUCET) |
| 56 |
|
| 57 |
include ./tools/mk/Makefile.deps |
| 58 |
include ./tools/mk/Makefile.smf.targ |
| 59 |
include ./tools/mk/Makefile.targ |