diff --git a/Makefile b/Makefile index aa8d75242c00f5..c58e6ad1dc13d7 100644 --- a/Makefile +++ b/Makefile @@ -332,16 +332,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")) +node_use_openssl = $(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 + @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ + echo "Skipping .docbuildstamp (no crypto)"; \ + else \ + $(RM) -r test/addons/??_*/; \ + [ -x $(NODE) ] && $(NODE) $< || node $< ; \ + touch $@; \ + fi ADDONS_BINDING_GYPS := \ $(filter-out test/addons/??_*/binding.gyp, \ @@ -609,11 +609,11 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json)) apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) tools/doc/node_modules: tools/doc/package.json -ifeq ($(node_use_openssl),true) - cd tools/doc && $(call available-node,$(run-npm-ci)) -else - @echo "Skipping tools/doc/node_modules (no crypto)" -endif + @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ + echo "Skipping tools/doc/node_modules (no crypto)"; \ + else \ + cd tools/doc && $(call available-node,$(run-npm-ci)) \ + fi .PHONY: doc-only doc-only: tools/doc/node_modules \