2012-02-18 08:15:52 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
# Makefile: basic Makefile for template API service
|
|
|
|
#
|
|
|
|
# This Makefile is a template for new repos. It contains only repo-specific
|
|
|
|
# logic and uses included makefiles to supply common targets (javascriptlint,
|
|
|
|
# jsstyle, restdown, etc.), which are used by other repos as well. You may well
|
|
|
|
# need to rewrite most of this file, but you shouldn't need to touch the
|
|
|
|
# included makefiles.
|
|
|
|
#
|
|
|
|
# If you find yourself adding support for new targets that could be useful for
|
|
|
|
# other projects too, you should add these to the original versions of the
|
|
|
|
# included Makefiles (in eng.git) so that other teams can use them too.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Tools
|
|
|
|
#
|
|
|
|
NPM := npm
|
|
|
|
TAP := ./node_modules/.bin/tap
|
|
|
|
|
|
|
|
#
|
|
|
|
# Files
|
|
|
|
#
|
|
|
|
DOC_FILES = client.md \
|
|
|
|
dn.md \
|
|
|
|
errors.md \
|
|
|
|
examples.md \
|
2012-05-14 20:44:32 +00:00
|
|
|
filters.md \
|
|
|
|
guide.md \
|
|
|
|
index.md \
|
|
|
|
persistent_search.md \
|
|
|
|
server.md
|
2012-02-18 08:15:52 +00:00
|
|
|
|
2014-06-18 22:56:13 +00:00
|
|
|
JS_FILES := $(shell find lib test -name '*.js') $(shell find bin -name 'ldapjs-*')
|
2012-02-18 08:15:52 +00:00
|
|
|
JSL_CONF_NODE = tools/jsl.node.conf
|
|
|
|
JSL_FILES_NODE = $(JS_FILES)
|
|
|
|
JSSTYLE_FILES = $(JS_FILES)
|
|
|
|
JSSTYLE_FLAGS = -f tools/jsstyle.conf
|
|
|
|
|
2012-09-20 19:38:46 +00:00
|
|
|
CLEAN_FILES += node_modules $(SHRINKWRAP) cscope.files
|
|
|
|
|
|
|
|
include ./tools/mk/Makefile.defs
|
|
|
|
|
2012-02-18 08:15:52 +00:00
|
|
|
# Repo-specific targets
|
|
|
|
#
|
|
|
|
.PHONY: all
|
2012-09-20 19:38:46 +00:00
|
|
|
all: $(TAP) $(REPO_DEPS)
|
|
|
|
$(NPM) rebuild
|
|
|
|
|
|
|
|
$(TAP): | $(NPM_EXEC)
|
2011-12-21 18:19:04 +00:00
|
|
|
$(NPM) install
|
2011-08-15 17:53:57 +00:00
|
|
|
|
2012-09-20 19:38:46 +00:00
|
|
|
CLEAN_FILES += $(TAP) ./node_modules/tap
|
|
|
|
|
2012-02-18 08:15:52 +00:00
|
|
|
.PHONY: test
|
2012-09-20 19:38:46 +00:00
|
|
|
test: $(TAP)
|
|
|
|
$(TAP) test/*.test.js
|
2013-01-11 10:01:51 +00:00
|
|
|
$(TAP) test/filters/*.test.js
|
2014-06-02 00:08:20 +00:00
|
|
|
$(TAP) test/controls/*.test.js
|
|
|
|
$(TAP) test/messages/*.test.js
|
2011-08-15 17:53:57 +00:00
|
|
|
|
2012-09-20 19:38:46 +00:00
|
|
|
include ./tools/mk/Makefile.deps
|
|
|
|
include ./tools/mk/Makefile.targ
|