@@ -932,6 +932,19 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
932932 ) \
933933 fi
934934
935+ doc/node.1 : doc/api/cli.md tools/doc/node_modules
936+ @if [ " $( shell $( node_use_openssl_and_icu) ) " != " true" ]; then \
937+ echo " Skipping $@ (no crypto and/or no ICU)" ; \
938+ else \
939+ $(call available-node, \
940+ $(DOC_KIT ) generate \
941+ -t man-page \
942+ -i $< \
943+ -o $(@D ) \
944+ -v $(VERSION ) \
945+ ) \
946+ fi
947+
935948.PHONY : docopen
936949docopen : doc-only # # Open the documentation in a web browser.
937950 @$(PYTHON ) -mwebbrowser file://$(abspath $< )
@@ -1480,8 +1493,29 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_
14801493 @$(call available-node,$(run-lint-md ) )
14811494 @touch $@
14821495
1496+ tools/.manpagelintstamp : doc/api/cli.md tools/doc/node_modules
1497+ $(info Verifying that doc/node.1 is up to date...)
1498+ @if [ " $( shell $( node_use_openssl_and_icu) ) " != " true" ]; then \
1499+ echo " Skipping doc/node.1 verification (no crypto and/or no ICU)" ; \
1500+ else \
1501+ $(RM ) -r out/doc/.manpagecheck && \
1502+ mkdir -p out/doc/.manpagecheck && \
1503+ $(call available-node, \
1504+ $(DOC_KIT ) generate \
1505+ -t man-page \
1506+ -i doc/api/cli.md \
1507+ -o out/doc/.manpagecheck \
1508+ -v $(VERSION ) \
1509+ ) \
1510+ if ! diff -u doc/node.1 out/doc/.manpagecheck/node.1; then \
1511+ echo ' doc/node.1 is out of date; run `make doc/node.1` to regenerate it.' ; \
1512+ exit 1; \
1513+ fi ; \
1514+ fi
1515+ @touch $@
1516+
14831517.PHONY : lint-md
1484- lint-md : lint-js-doc | tools/.mdlintstamp # # Lint the markdown documents maintained by us in the codebase.
1518+ lint-md : lint-js-doc | tools/.mdlintstamp tools/.manpagelintstamp # # Lint the markdown documents maintained by us in the codebase.
14851519
14861520run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES )
14871521.PHONY : format-md
0 commit comments