Skip to content

Commit

Permalink
build: reduce noise from doc target
Browse files Browse the repository at this point in the history
The doc target currently echos the complete shell command, which might
produces a lot of output. Using this change the actual commands run
are still shown.

Before:
[ -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 ../.././deps/npm/bin/npm-cli.js
install; \
        else \
            cd tools/doc && node ../.././deps/npm/bin/npm-cli.js
install; \
        fi
[ -x ./node ] && ./node tools/doc/generate.js --node-version=v8.0.0
--format=html --template=doc/template.html doc/api/assert.md >
out/doc/api/assert.html || node tools/doc/generate.js
--node-version=v8.0.0 --format=html --template=doc/template.html
doc/api/assert.md > out/doc/api/assert.html
Input file = doc/api/assert.md

After:
[ -x ./node ] && ./node tools/doc/generate.js --node-version=v8.0.0
--format=html --template=doc/template.html doc/api/assert.md >
out/doc/api/assert.html || node tools/doc/generate.js
--node-version=v8.0.0 --format=html --template=doc/template.html
doc/api/assert.md > out/doc/api/assert.html
Input file = doc/api/assert.md

To verify run:
$ make docclean
$ make doc

PR-URL: #9457
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: James Snell <[email protected]>
  • Loading branch information
danbev authored and evanlucas committed Nov 7, 2016
1 parent 44792f8 commit 1109d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ out/doc/%: doc/%
# check if ./node is actually set, else use user pre-installed binary
gen-json = tools/doc/generate.js --format=json $< > $@
out/doc/api/%.json: doc/api/%.md
[ -e tools/doc/node_modules/js-yaml/package.json ] || \
@[ -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; \
Expand All @@ -327,7 +327,7 @@ out/doc/api/%.json: doc/api/%.md
# check if ./node is actually set, else use user pre-installed binary
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html --template=doc/template.html $< > $@
out/doc/api/%.html: doc/api/%.md
[ -e tools/doc/node_modules/js-yaml/package.json ] || \
@[ -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; \
Expand Down

0 comments on commit 1109d0b

Please sign in to comment.