@@ -492,28 +492,25 @@ out/doc/%: doc/%
492492
493493#  check if ./node is actually set, else use user pre-installed binary
494494gen-json  = tools/doc/generate.js --format=json $<  > $@ 
495- out/doc/api/% .json : doc/api/% .md
496- 	@[ -e  tools/doc/node_modules/js-yaml/package.json ] ||  \ 
495+ gen-html  = tools/doc/generate.js --node-version=$(FULLVERSION )  --format=html \ 
496+ 			--template=doc/template.html --analytics=$(DOCS_ANALYTICS )  $<  > $@ 
497+ 
498+ gen-doc  =	\ 
499+ 	[ -e tools/doc/node_modules/js-yaml/package.json ] || \ 
497500		[ -e tools/eslint/node_modules/js-yaml/package.json ] || \ 
498501		if [ -x $(NODE )  ]; then \ 
499502			cd tools/doc && ../../$(NODE )  ../../$(NPM )  install; \ 
500503		else \ 
501504			cd tools/doc && node ../../$(NPM )  install; \ 
502- 		fi 
503- 	[ -x  $( NODE) &&  $(NODE )  $(gen-json )  ||  node $(gen-json ) 
505+ 		fi;\ 
506+ 	[ -x $(NODE )  ] && $(NODE )  $(gen-json )  || node
507+ 
508+ out/doc/api/% .json : doc/api/% .md
509+ 	$(gen-doc )  $(gen-json ) 
504510
505511#  check if ./node is actually set, else use user pre-installed binary
506- gen-html  = tools/doc/generate.js --node-version=$(FULLVERSION )  --format=html \ 
507- 			--template=doc/template.html --analytics=$(DOCS_ANALYTICS )  $<  > $@ 
508512out/doc/api/% .html : doc/api/% .md
509- 	@[ -e  tools/doc/node_modules/js-yaml/package.json ] ||  \ 
510- 		[ -e  tools/eslint/node_modules/js-yaml/package.json ] ||  \ 
511- 		if  [ -x  $( NODE) ;  then  \
512- 			cd  tools/doc &&  ../../$(NODE )  ../../$(NPM )  install;  \ 
513- 		else  \ 
514- 			cd  tools/doc &&  node ../../$(NPM )  install;  \ 
515- 		fi 
516- 	[ -x  $( NODE) &&  $(NODE )  $(gen-html )  ||  node $(gen-html ) 
513+ 	$(gen-doc )  $(gen-html ) 
517514
518515docopen : $(apidocs_html ) 
519516	@$(PYTHON )  -mwebbrowser file://$(PWD ) /out/doc/api/all.html
@@ -880,15 +877,17 @@ bench: bench-net bench-http bench-fs bench-tls
880877
881878bench-ci : bench
882879
880+ JSLINT_TARGETS  = benchmark doc lib test tools
881+ 
883882jslint :
884883	@echo " Running JS linter..." 
885884	$(NODE )  tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js,.md \ 
886- 	  benchmark doc lib  test  tools 
885+ 	  $( JSLINT_TARGETS ) 
887886
888887jslint-ci :
889888	@echo " Running JS linter..." 
890889	$(NODE )  tools/jslint.js $(PARALLEL_ARGS )  -f tap -o test-eslint.tap \ 
891- 		benchmark doc lib  test  tools 
890+ 		$( JSLINT_TARGETS ) 
892891
893892CPPLINT_EXCLUDE  ?=
894893CPPLINT_EXCLUDE  += src/node_root_certs.h
0 commit comments