0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 13:09:21 +01:00

tools: disable doc building when ICU is not available

PR-URL: https://github.com/nodejs/node/pull/51192
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
Antoine du Hamel 2024-11-16 22:56:56 +01:00 committed by Node.js GitHub Bot
parent b0051de23b
commit be34b5e7fc

View File

@ -375,11 +375,11 @@ ifeq ($(OSTYPE),os400)
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
endif endif
node_use_openssl = $(call available-node,"-p" \ node_use_openssl_and_icu = $(call available-node,"-p" \
"process.versions.openssl != undefined") "process.versions.openssl != undefined && process.versions.icu != undefined")
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \ @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping .docbuildstamp (no crypto)"; \ echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
else \ else \
$(RM) -r test/addons/??_*/; \ $(RM) -r test/addons/??_*/; \
[ -x $(NODE) ] && $(NODE) $< || node $< ; \ [ -x $(NODE) ] && $(NODE) $< || node $< ; \
@ -535,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
# CI_* variables should be kept synchronized with the ones in vcbuild.bat # CI_* variables should be kept synchronized with the ones in vcbuild.bat
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
CI_JS_SUITES ?= $(JS_SUITES) pummel CI_JS_SUITES ?= $(JS_SUITES) pummel
ifeq ($(node_use_openssl), false) ifeq ($(node_use_openssl_and_icu), false)
CI_DOC := doctool CI_DOC := doctool
else else
CI_DOC = CI_DOC =
@ -632,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando
.PHONY: test-doc .PHONY: test-doc
test-doc: doc-only lint-md ## Build, lint, and verify the docs. test-doc: doc-only lint-md ## Build, lint, and verify the docs.
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \ @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping test-doc (no crypto)"; \ echo "Skipping test-doc (no crypto and/or no ICU)"; \
else \ else \
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \ $(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
fi fi
@ -749,8 +749,8 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
tools/doc/node_modules: tools/doc/package.json tools/doc/node_modules: tools/doc/package.json
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \ @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping tools/doc/node_modules (no crypto)"; \ echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
else \ else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \ cd tools/doc && $(call available-node,$(run-npm-ci)) \
fi fi
@ -758,8 +758,8 @@ tools/doc/node_modules: tools/doc/package.json
.PHONY: doc-only .PHONY: doc-only
doc-only: tools/doc/node_modules \ doc-only: tools/doc/node_modules \
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary. $(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \ @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping doc-only (no crypto)"; \ echo "Skipping doc-only (no crypto and/or no ICU)"; \
else \ else \
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \ $(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
fi fi
@ -1382,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
# Note that on the CI `lint-js-ci` is run instead. # Note that on the CI `lint-js-ci` is run instead.
lint-js-doc: LINT_JS_TARGETS=doc lint-js-doc: LINT_JS_TARGETS=doc
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \ @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping $@ (no crypto)"; \ echo "Skipping $@ (no crypto and/or no ICU)"; \
else \ else \
echo "Running JS linter..."; \ echo "Running JS linter..."; \
$(call available-node,$(run-lint-js)) \ $(call available-node,$(run-lint-js)) \