Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 042749f

Browse filesBrowse files
joyeecheungMylesBorins
authored andcommitted
build: only try to find node when it's needed by the target
Right now `node -p process.versions.openssl` always gets run in the Makefile even when it's not needed by the target (e.g. `make clean`, `make test-only`). This patch makes it a run time call instead of part of the global expansion. PR-URL: #24115 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 44a1993 commit 042749f
Copy full SHA for 042749f

File tree

Expand file treeCollapse file tree

1 file changed

+14
-14
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-14
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+14-14Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -332,16 +332,16 @@ ifeq ($(OSTYPE),aix)
332332
DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp
333333
endif
334334

335-
node_use_openssl = $(shell $(call available-node,"-p" \
336-
"process.versions.openssl != undefined"))
335+
node_use_openssl = $(call available-node,"-p" \
336+
"process.versions.openssl != undefined")
337337
test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
338-
ifeq ($(node_use_openssl),true)
339-
$(RM) -r test/addons/??_*/
340-
[ -x $(NODE) ] && $(NODE) $< || node $<
341-
touch $@
342-
else
343-
@echo "Skipping .docbuildstamp (no crypto)"
344-
endif
338+
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
339+
echo "Skipping .docbuildstamp (no crypto)"; \
340+
else \
341+
$(RM) -r test/addons/??_*/; \
342+
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
343+
touch $@; \
344+
fi
345345

346346
ADDONS_BINDING_GYPS := \
347347
$(filter-out test/addons/??_*/binding.gyp, \
@@ -609,11 +609,11 @@ apidocs_json = $(addprefix out/,$(apidoc_sources:.md=.json))
609609
apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*)))
610610

611611
tools/doc/node_modules: tools/doc/package.json
612-
ifeq ($(node_use_openssl),true)
613-
cd tools/doc && $(call available-node,$(run-npm-ci))
614-
else
615-
@echo "Skipping tools/doc/node_modules (no crypto)"
616-
endif
612+
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
613+
echo "Skipping tools/doc/node_modules (no crypto)"; \
614+
else \
615+
cd tools/doc && $(call available-node,$(run-npm-ci)) \
616+
fi
617617

618618
.PHONY: doc-only
619619
doc-only: tools/doc/node_modules \

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.