Skip to content

Commit e9ff0f8

Browse files
eljefedelrodeodeljefeMyles Borins
authored and
Myles Borins
committedJul 14, 2016
doc: make doc-only -> fallback to user binary
After the #3888 it was not possible to "make doc-only" in some situations. This now fallsback to any installed node version and throws "node not found" in error case. Ref: #3888 PR-URL: #6906 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 223c0e2 commit e9ff0f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,15 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
272272
out/doc/%: doc/%
273273
cp -r $< $@
274274

275+
# check if ./node is actually set, else use user pre-installed binary
276+
gen-json = tools/doc/generate.js --format=json $< > $@
275277
out/doc/api/%.json: doc/api/%.md
276-
$(NODE) tools/doc/generate.js --format=json $< > $@
278+
[ -x $(NODE) ] && $(NODE) $(gen-json) || node $(gen-json)
277279

280+
# check if ./node is actually set, else use user pre-installed binary
281+
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@
278282
out/doc/api/%.html: doc/api/%.md
279-
$(NODE) tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@
283+
[ -x $(NODE) ] && $(NODE) $(gen-html) || node $(gen-html)
280284

281285
docopen: out/doc/api/all.html
282286
-google-chrome out/doc/api/all.html

0 commit comments

Comments
 (0)
Please sign in to comment.