mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
build: add crypto check to build targets
Currently when configured without-ssl the build will fail when trying
to run the tools/doc/node_modules, and .docbuildstamp make targets:
internal/util.js:97
throw new ERR_NO_CRYPTO();
^
Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
at assertCrypto (internal/util.js:97:11)
at crypto.js:31:1
...
at Object.<anonymous>
(/node/deps/npm/node_modules/uuid/lib/rng.js:4:14)
at Module._compile (internal/modules/cjs/loader.js:689:30)
...
make[1]: *** [tools/doc/node_modules] Error 1
This commit adds crypto check to these targets to allow the build to
pass.
PR-URL: https://github.com/nodejs/node/pull/22148
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
1 parent
cdb8c1b44d
commit
c42ff4ebd8
1 file changed
+11
-3
@@ -320,10 +320,16 @@ ifeq ($(OSTYPE),aix)
|
||||
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
|
||||
endif
|
||||
|
||||
node_use_openssl = $(shell $(call available-node,"-p" \
|
||||
"process.versions.openssl != undefined"))
|
||||
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
|
||||
ifeq ($(node_use_openssl),true)
|
||||
$(RM) -r test/addons/??_*/
|
||||
[ -x $(NODE) ] && $(NODE) $< || node $<
|
||||
touch $@
|
||||
else
|
||||
@echo "Skipping .docbuildstamp (no crypto)"
|
||||
endif
|
||||
|
||||
ADDONS_BINDING_GYPS := \
|
||||
$(filter-out test/addons/??_*/binding.gyp, \
|
||||
@@ -1062,15 +1068,17 @@ lint-md-build: tools/remark-cli/node_modules \
|
||||
|
||||
.PHONY: tools/doc/node_modules
|
||||
tools/doc/node_modules:
|
||||
@cd tools/doc && $(call available-node,$(run-npm-install))
|
||||
ifeq ($(node_use_openssl),true)
|
||||
cd tools/doc && $(call available-node,$(run-npm-install))
|
||||
else
|
||||
@echo "Skipping tools/doc/node_modules (no crypto)"
|
||||
endif
|
||||
|
||||
.PHONY: lint-md
|
||||
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
|
||||
|
||||
LINT_MD_DOC_FILES = $(shell ls doc/*.md doc/**/*.md)
|
||||
run-lint-doc-md = tools/remark-cli/cli.js -q -f $(LINT_MD_DOC_FILES)
|
||||
node_use_openssl = $(shell $(call available-node,"-p" \
|
||||
"process.versions.openssl != undefined"))
|
||||
# Lint all changed markdown files under doc/
|
||||
tools/.docmdlintstamp: $(LINT_MD_DOC_FILES)
|
||||
ifeq ($(node_use_openssl),true)
|
||||
|
||||
Reference in new issue
Block a user