build: allow proper generation of html docs
`gen-doc` always calls `gen-json`, which means it's impossible to generate html docs. Changed this to pass in the command the user wants to run. PR-URL: https://github.com/nodejs/node/pull/14932 Fixes: https://github.com/nodejs/node/issues/14930 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
58ca8c68c4
commit
8850fd4da1
6
Makefile
6
Makefile
@ -503,14 +503,14 @@ gen-doc = \
|
|||||||
else \
|
else \
|
||||||
cd tools/doc && node ../../$(NPM) install; \
|
cd tools/doc && node ../../$(NPM) install; \
|
||||||
fi;\
|
fi;\
|
||||||
[ -x $(NODE) ] && $(NODE) $(gen-json) || node
|
[ -x $(NODE) ] && $(NODE) $(1) || node $(1)
|
||||||
|
|
||||||
out/doc/api/%.json: doc/api/%.md
|
out/doc/api/%.json: doc/api/%.md
|
||||||
$(gen-doc) $(gen-json)
|
$(call gen-doc, $(gen-json))
|
||||||
|
|
||||||
# check if ./node is actually set, else use user pre-installed binary
|
# check if ./node is actually set, else use user pre-installed binary
|
||||||
out/doc/api/%.html: doc/api/%.md
|
out/doc/api/%.html: doc/api/%.md
|
||||||
$(gen-doc) $(gen-html)
|
$(call gen-doc, $(gen-html))
|
||||||
|
|
||||||
docopen: $(apidocs_html)
|
docopen: $(apidocs_html)
|
||||||
@$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html
|
@$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html
|
||||||
|
Loading…
x
Reference in New Issue
Block a user