From 4b53d09615af757ddef46d4fb149075b707be47b Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 31 Oct 2025 13:45:15 +0100 Subject: [PATCH] build: fix inconsistent quoting in `Makefile` --- Makefile | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index bccbac90bca748..80bdd911fa8c8c 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ endif ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]') COVTESTS ?= test-cov COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js -GTEST_FILTER ?= "*" +GTEST_FILTER ?= * GNUMAKEFLAGS += --no-print-directory GCOV ?= gcov PWD = $(CURDIR) @@ -31,9 +31,9 @@ else endif ifdef ENABLE_V8_TAP - TAP_V8 := --junitout $(PWD)/v8-tap.xml - TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml - TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml + TAP_V8 := --junitout '$(PWD)/v8-tap.xml' + TAP_V8_INTL := --junitout '$(PWD)/v8-intl-tap.xml' + TAP_V8_BENCHMARKS := --junitout '$(PWD)/v8-benchmarks-tap.xml' define convert_to_junit @true endef @@ -47,12 +47,12 @@ ifdef ENABLE_CONVERT_V8_JSON_TO_XML # By default, the V8's JSON test output only includes the tests which have # failed. We use --slow-tests-cutoff to ensure that all tests are present # in the output, including those which pass. - TAP_V8 := --json-test-results $(TAP_V8_JSON) --slow-tests-cutoff 1000000 - TAP_V8_INTL := --json-test-results $(TAP_V8_INTL_JSON) --slow-tests-cutoff 1000000 - TAP_V8_BENCHMARKS := --json-test-results $(TAP_V8_BENCHMARKS_JSON) --slow-tests-cutoff 1000000 + TAP_V8 := --json-test-results '$(TAP_V8_JSON)' --slow-tests-cutoff 1000000 + TAP_V8_INTL := --json-test-results '$(TAP_V8_INTL_JSON)' --slow-tests-cutoff 1000000 + TAP_V8_BENCHMARKS := --json-test-results '$(TAP_V8_BENCHMARKS_JSON)' --slow-tests-cutoff 1000000 define convert_to_junit - export PATH="$(NO_BIN_OVERRIDE_PATH)" && \ + PATH="$(NO_BIN_OVERRIDE_PATH)" \ $(PYTHON) tools/v8-json-to-junit.py < $(1) > $(1:.json=.xml) endef endif @@ -79,7 +79,7 @@ EXEEXT := $(shell $(PYTHON) -c \ NODE_EXE = node$(EXEEXT) # Use $(PWD) so we can cd to anywhere before calling this -NODE ?= "$(PWD)/$(NODE_EXE)" +NODE ?= $(PWD)/$(NODE_EXE) NODE_G_EXE = node_g$(EXEEXT) NPM ?= ./deps/npm/bin/npm-cli.js @@ -94,8 +94,8 @@ V ?= 0 # Use -e to double check in case it's a broken link available-node = \ - if [ -x "$(NODE)" ] && [ -e "$(NODE)" ]; then \ - "$(NODE)" $(1); \ + if [ -x '$(NODE)' ] && [ -e '$(NODE)' ]; then \ + '$(NODE)' $(1); \ elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \ `command -v node` $(1); \ else \ @@ -260,7 +260,7 @@ coverage-build: all ## Build coverage files. coverage-build-js: ## Build JavaScript coverage files. mkdir -p node_modules if [ ! -d node_modules/c8 ]; then \ - $(NODE) ./deps/npm install c8 --no-save --no-package-lock;\ + '$(NODE)' ./deps/npm install c8 --no-save --no-package-lock;\ fi .PHONY: coverage-test @@ -287,13 +287,13 @@ coverage-test: coverage-build ## Run the tests and generate a coverage report. .PHONY: coverage-report-js coverage-report-js: ## Report JavaScript coverage results. -$(MAKE) coverage-build-js - $(NODE) ./node_modules/.bin/c8 report + '$(NODE)' ./node_modules/.bin/c8 report .PHONY: cctest cctest: all ## Run the C++ tests using the built `cctest` executable. - @out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER) - $(NODE) ./test/embedding/test-embedding.js + @out/$(BUILDTYPE)/$@ --gtest_filter="$(GTEST_FILTER)" + '$(NODE)' ./test/embedding/test-embedding.js .PHONY: list-gtests list-gtests: ## List all available C++ gtests. @@ -385,7 +385,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \ else \ $(RM) -r test/addons/??_*/; \ - [ -x $(NODE) ] && $(NODE) $< || node $< ; \ + [ -x '$(NODE)' ] && '$(NODE)' $< || node $< ; \ [ $$? -eq 0 ] && touch $@; \ fi @@ -605,7 +605,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ $(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC) - $(NODE) ./test/embedding/test-embedding.js + '$(NODE)' ./test/embedding/test-embedding.js $(info Clean up any leftover processes, error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ @@ -651,8 +651,8 @@ test-wpt: all ## Run the Web Platform Tests. test-wpt-report: ## Run the Web Platform Tests and generate a report. $(RM) -r out/wpt mkdir -p out/wpt - -WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt - $(NODE) "$$PWD/tools/merge-wpt-reports.mjs" + -WPT_REPORT=1 $(PYTHON) tools/test.py --shell '$(NODE)' $(PARALLEL_ARGS) wpt + '$(NODE)' "$$PWD/tools/merge-wpt-reports.mjs" .PHONY: test-internet test-internet: all ## Run internet tests. @@ -672,7 +672,7 @@ test-doc: doc-only lint-md ## Build, lint, and verify the docs. .PHONY: test-doc-ci test-doc-ci: doc-only ## Build, lint, and verify the docs (CI). - $(PYTHON) tools/test.py --shell $(NODE) $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool + $(PYTHON) tools/test.py --shell '$(NODE)' $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool .PHONY: test-known-issues test-known-issues: all ## Run tests for known issues. @@ -681,11 +681,11 @@ test-known-issues: all ## Run tests for known issues. # Related CI job: node-test-npm .PHONY: test-npm test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm. - $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test + '$(NODE)' tools/test-npm-package --install --logfile=test-npm.tap deps/npm test .PHONY: test-npm-publish test-npm-publish: $(NODE_EXE) ## Test the `npm publish` command. - npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js + npm_package_config_publishtest=true '$(NODE)' deps/npm/test/run.js .PHONY: test-js-native-api test-js-native-api: test-build-js-native-api ## Run JS Native-API tests. @@ -829,7 +829,7 @@ out/doc/api/assets/%: doc/api_assets/% | out/doc/api/assets @cp $< $@ ; $(RM) out/doc/api/assets/README.md -run-npm-ci = $(PWD)/$(NPM) ci +run-npm-ci = '$(PWD)/$(NPM)' ci LINK_DATA = out/doc/apilinks.json VERSIONS_DATA = out/previous-doc-versions.json @@ -1169,7 +1169,7 @@ endif $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx - $(NODE) tools/license2rtf.mjs < LICENSE > \ + '$(NODE)' tools/license2rtf.mjs < LICENSE > \ $(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources pkgbuild --version $(FULLVERSION) \ @@ -1667,8 +1667,8 @@ HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo .PHONY: gen-openssl ifeq ($(HAS_DOCKER), 1) -DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v $(PWD):/node -IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null) +DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v '$(PWD):/node' +IS_IN_WORKTREE = $(shell grep '^gitdir: ' '$(PWD)/.git' 2>/dev/null) GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir) DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON)) gen-openssl: ## Generate platform dependent openssl files (requires docker).