diff --git a/.gitignore b/.gitignore index 16b03f7702dd..87b60fb960bb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ ######### package.json.copy .stdlibrc +sources.txt # Directories # ############### diff --git a/tools/make/README.md b/tools/make/README.md index a2b918d0eeea..3bc1b1ab63f1 100644 --- a/tools/make/README.md +++ b/tools/make/README.md @@ -22,7 +22,7 @@ limitations under the License. > Development utility. -This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make]. +This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make]. ## Usage @@ -405,6 +405,12 @@ To generate documentation from [JSDoc][jsdoc] source code comments, $ make docs-src ``` +sometimes you might get an error `Argument listing too long` then use, + +```bash +$ make src-docs-out +``` + To view the documentation in a local web browser, ```bash diff --git a/tools/make/lib/docs/jsdoc.mk b/tools/make/lib/docs/jsdoc.mk index 3e5374302944..71bbb730cc7d 100644 --- a/tools/make/lib/docs/jsdoc.mk +++ b/tools/make/lib/docs/jsdoc.mk @@ -85,6 +85,18 @@ jsdoc-html: $(NODE_MODULES) .PHONY: jsdoc-html +# Generate JSDoc HTML documentation. +# +# See issue #6583 + +jsdoc-html-out: $(NODE_MODULES) + $(QUIET) $(DELETE) $(DELETE_FLAGS) $(JSDOC_HTML_OUT) + $(QUIET) $(MKDIR_RECURSIVE) $(JSDOC_HTML_OUT) + $(QUIET) find . -type f -name "$(SOURCES_PATTERN)" > sources.txt + $(QUIET) cat sources.txt | xargs $(JSDOC) $(JSDOC_HTML_FLAGS) $(JSDOC_TYPEDEF) + +.PHONY: jsdoc-html-out + # Generate JSDoc JSON. # diff --git a/tools/make/lib/docs/src.mk b/tools/make/lib/docs/src.mk index 84e5ba20f65d..f50cb92d96b0 100644 --- a/tools/make/lib/docs/src.mk +++ b/tools/make/lib/docs/src.mk @@ -47,6 +47,23 @@ endif .PHONY: src-docs +# Generate source documentation. +# +# use this if you get error +# "Argument Listing too long" +# +# ```bash +# make src-docs-out +# ``` + +src-docs-out: +ifeq ($(SRC_DOC_GENERATOR), jsdoc) + $(QUIET) $(MAKE) -f $(this_file) jsdoc-html-out +endif + +.PHONY: src-docs-out + + # View HTML documentation. # # This target opens source HTML documentation in a local web browser.