Debian Codegraph @

Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 1 of 2 — not the installed (fully patched) source.
2 Debian patches touch this file
1 #
2 # Copyright (c) 2012, Joyent, Inc. All rights reserved.
3 #
4 # Makefile: basic Makefile for template API service
5 #
6 # This Makefile is a template for new repos. It contains only repo-specific
7 # logic and uses included makefiles to supply common targets (javascriptlint,
8 # jsstyle, restdown, etc.), which are used by other repos as well. You may well
9 # need to rewrite most of this file, but you shouldn't need to touch the
10 # included makefiles.
11 #
12 # If you find yourself adding support for new targets that could be useful for
13 # other projects too, you should add these to the original versions of the
14 # included Makefiles (in eng.git) so that other teams can use them too.
15 #
16
17 #
18 # Tools
19 #
20 # Get md2man-roff from <https://github.com/sunaku/md2man>
21 MD2MAN := md2man-roff
22 NPM_EXEC := npm
23 TAP := ./node_modules/tape/bin/tape
24
25 #
26 # Files
27 #
28 JS_FILES := $(shell find lib -name '*.js')
29 JSL_CONF_NODE = tools/jsl.node.conf
30 JSL_FILES_NODE = $(JS_FILES)
31 JSSTYLE_FILES = $(JS_FILES)
32 JSSTYLE_FLAGS = -f tools/jsstyle.conf
33
34 MAN_PAGES := $(shell ls man/src)
35 MAN_OUTDIR := man/man1
36 MAN_OUTPAGES=$(MAN_PAGES:%.md=$(MAN_OUTDIR)/%.1)
37 MAN_ROOT := man/src
38
39 include ./tools/mk/Makefile.defs
40 include ./tools/mk/Makefile.node_deps.defs
41
42 #
43 # Repo-specific targets
44 #
45 .PHONY: all
46 all: $(REPO_DEPS)
47 # $(NPM_EXEC) install
48
49 CLEAN_FILES += $(TAP) ./node_modules/tap
50
51 .PHONY: test
52 test: all
53 TAP=1 $(TAP) test/*.js
54
55 .PHONY: coverage
56 coverage: all
57 $(NPM_EXEC) install istanbul && \
58 ./node_modules/.bin/istanbul cover \
59 $(TAP) test/*.js
60
61 .PHONY: codecovio
62 codecovio: coverage
63 $(NPM_EXEC) install codecov.io && \
64 ./node_modules/.bin/codecov < coverage/lcov.info
65
66 $(MAN_OUTDIR):
67 mkdir -p $@
68
69 $(MAN_OUTDIR)/%.1: $(MAN_ROOT)/%.md | $(MAN_OUTDIR)
70 $(MD2MAN) $^ > $@
71
72 .PHONY: manpages
73 manpages: $(MAN_OUTPAGES)
74
75 include ./tools/mk/Makefile.deps
76 include ./tools/mk/Makefile.node_deps.targ
77 include ./tools/mk/Makefile.targ