Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: only try to run node when it's needed by the target #24115

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand Down Expand Up @@ -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 \
Expand Down