diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-08-06 09:26:36 +0200 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2018-08-10 07:15:33 +0200 |
commit | 77da6d9e8c9496269d19dab00ea6f7f0b37e2839 (patch) | |
tree | 6dc0306a2beea89d16c1a4571abe935703fe437c /Makefile | |
parent | d3d54aa8ef6e4df04507f3d3a1b891c863eb497b (diff) | |
download | android-node-v8-77da6d9e8c9496269d19dab00ea6f7f0b37e2839.tar.gz android-node-v8-77da6d9e8c9496269d19dab00ea6f7f0b37e2839.tar.bz2 android-node-v8-77da6d9e8c9496269d19dab00ea6f7f0b37e2839.zip |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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) |