Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-11-01 07:13:18 +0300
committerGibson Fahnestock <gibfahn@gmail.com>2017-12-20 04:58:47 +0300
commit8319b68873a91adaf0fe91a1c822f1d9390c0588 (patch)
tree39717d8570ece23c11aae4a2f5cdc20985a04a99
parent5d06a4f9072cade2b32d94e0ebb044cfece64a6b (diff)
tools: try installing js-yaml only once
PR-URL: https://github.com/nodejs/node/pull/16661 Fixes: https://github.com/nodejs/node/issues/16650 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4ab99b5bd31..657c9e3dc60 100644
--- a/Makefile
+++ b/Makefile
@@ -544,7 +544,8 @@ apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
-doc-only: $(apidocs_html) $(apidocs_json)
+doc-targets: $(apidocs_html) $(apidocs_json)
+doc-only: | install-yaml doc-targets
doc: $(NODE_EXE) doc-only
$(apidoc_dirs):
@@ -561,15 +562,16 @@ gen-json = tools/doc/generate.js --format=json $< > $@
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html \
--template=doc/template.html --analytics=$(DOCS_ANALYTICS) $< > $@
-gen-doc = \
+install-yaml:
[ -e tools/doc/node_modules/js-yaml/package.json ] || \
[ -e tools/eslint/node_modules/js-yaml/package.json ] || \
if [ -x $(NODE) ]; then \
cd tools/doc && ../../$(NODE) ../../$(NPM) install; \
else \
cd tools/doc && node ../../$(NPM) install; \
- fi;\
- [ -x $(NODE) ] && $(NODE) $(1) || node $(1)
+ fi;
+
+gen-doc = [ -x $(NODE) ] && $(NODE) $(1) || node $(1)
out/doc/api/%.json: doc/api/%.md
@$(call gen-doc, $(gen-json))
@@ -1155,6 +1157,7 @@ lint-clean:
install \
install-bin \
install-includes \
+ install-yaml \
lint \
lint-clean \
lint-ci \