Skip to content

Commit be34b5e

Browse files
aduh95nodejs-github-bot
authored andcommitted
tools: disable doc building when ICU is not available
PR-URL: #51192 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ulises Gascón <[email protected]>
1 parent b0051de commit be34b5e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,11 @@ ifeq ($(OSTYPE),os400)
375375
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
376376
endif
377377

378-
node_use_openssl = $(call available-node,"-p" \
379-
"process.versions.openssl != undefined")
378+
node_use_openssl_and_icu = $(call available-node,"-p" \
379+
"process.versions.openssl != undefined && process.versions.icu != undefined")
380380
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
381-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
382-
echo "Skipping .docbuildstamp (no crypto)"; \
381+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
382+
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
383383
else \
384384
$(RM) -r test/addons/??_*/; \
385385
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
@@ -535,7 +535,7 @@ NATIVE_SUITES ?= addons js-native-api node-api
535535
# CI_* variables should be kept synchronized with the ones in vcbuild.bat
536536
CI_NATIVE_SUITES ?= $(NATIVE_SUITES) benchmark
537537
CI_JS_SUITES ?= $(JS_SUITES) pummel
538-
ifeq ($(node_use_openssl), false)
538+
ifeq ($(node_use_openssl_and_icu), false)
539539
CI_DOC := doctool
540540
else
541541
CI_DOC =
@@ -632,8 +632,8 @@ test-hash-seed: all ## Verifu that the hash seed used by V8 for hashing is rando
632632

633633
.PHONY: test-doc
634634
test-doc: doc-only lint-md ## Build, lint, and verify the docs.
635-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
636-
echo "Skipping test-doc (no crypto)"; \
635+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
636+
echo "Skipping test-doc (no crypto and/or no ICU)"; \
637637
else \
638638
$(PYTHON) tools/test.py $(PARALLEL_ARGS) doctool; \
639639
fi
@@ -749,17 +749,17 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
749749
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
750750

751751
tools/doc/node_modules: tools/doc/package.json
752-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
753-
echo "Skipping tools/doc/node_modules (no crypto)"; \
752+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
753+
echo "Skipping tools/doc/node_modules (no crypto and/or no ICU)"; \
754754
else \
755755
cd tools/doc && $(call available-node,$(run-npm-ci)) \
756756
fi
757757

758758
.PHONY: doc-only
759759
doc-only: tools/doc/node_modules \
760760
$(apidoc_dirs) $(apiassets) ## Build the docs with the local or the global Node.js binary.
761-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
762-
echo "Skipping doc-only (no crypto)"; \
761+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
762+
echo "Skipping doc-only (no crypto and/or no ICU)"; \
763763
else \
764764
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
765765
fi
@@ -1382,8 +1382,8 @@ lint-js-fix: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint and fix the
13821382
# Note that on the CI `lint-js-ci` is run instead.
13831383
lint-js-doc: LINT_JS_TARGETS=doc
13841384
lint-js lint-js-doc: tools/eslint/node_modules/eslint/bin/eslint.js ## Lint the JavaScript code with eslint./eslint/bin/eslint.js
1385-
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
1386-
echo "Skipping $@ (no crypto)"; \
1385+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
1386+
echo "Skipping $@ (no crypto and/or no ICU)"; \
13871387
else \
13881388
echo "Running JS linter..."; \
13891389
$(call available-node,$(run-lint-js)) \

0 commit comments

Comments
 (0)