build: fix inconsistent quoting in `Makefile` · nodejs/node@ef8d26c
@@ -17,7 +17,7 @@ endif
1717ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]')
1818COVTESTS ?= test-cov
1919COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
20-GTEST_FILTER ?= "*"
20+GTEST_FILTER ?= *
2121GNUMAKEFLAGS += --no-print-directory
2222GCOV ?= gcov
2323PWD = $(CURDIR)
@@ -31,9 +31,9 @@ else
3131endif
32323333ifdef ENABLE_V8_TAP
34- TAP_V8 := --junitout $(PWD)/v8-tap.xml
35- TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
36- TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
34+ TAP_V8 := --junitout '$(PWD)/v8-tap.xml'
35+ TAP_V8_INTL := --junitout '$(PWD)/v8-intl-tap.xml'
36+ TAP_V8_BENCHMARKS := --junitout '$(PWD)/v8-benchmarks-tap.xml'
3737define convert_to_junit
3838 @true
3939endef
@@ -47,12 +47,12 @@ ifdef ENABLE_CONVERT_V8_JSON_TO_XML
4747# By default, the V8's JSON test output only includes the tests which have
4848# failed. We use --slow-tests-cutoff to ensure that all tests are present
4949# in the output, including those which pass.
50- TAP_V8 := --json-test-results $(TAP_V8_JSON) --slow-tests-cutoff 1000000
51- TAP_V8_INTL := --json-test-results $(TAP_V8_INTL_JSON) --slow-tests-cutoff 1000000
52- TAP_V8_BENCHMARKS := --json-test-results $(TAP_V8_BENCHMARKS_JSON) --slow-tests-cutoff 1000000
50+ TAP_V8 := --json-test-results '$(TAP_V8_JSON)' --slow-tests-cutoff 1000000
51+ TAP_V8_INTL := --json-test-results '$(TAP_V8_INTL_JSON)' --slow-tests-cutoff 1000000
52+ TAP_V8_BENCHMARKS := --json-test-results '$(TAP_V8_BENCHMARKS_JSON)' --slow-tests-cutoff 1000000
53535454define convert_to_junit
55-export PATH="$(NO_BIN_OVERRIDE_PATH)" && \
55+ PATH="$(NO_BIN_OVERRIDE_PATH)" \
5656$(PYTHON) tools/v8-json-to-junit.py < $(1) > $(1:.json=.xml)
5757endef
5858endif
@@ -83,11 +83,11 @@ NPM ?= ./deps/npm/bin/npm-cli.js
83838484# Release build of node.
8585# Use $(PWD) so we can cd to anywhere before calling this.
86-NODE ?= "$(PWD)/$(NODE_EXE)"
86+NODE ?= $(PWD)/$(NODE_EXE)
8787# Prefer $(OUT_NODE) when running tests. Use $(NODE)
8888# when generating coverage reports or running toolings as
8989# debug build is be slower.
90-OUT_NODE ?= "$(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)"
90+OUT_NODE ?= $(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)
91919292# Flags for packaging.
9393BUILD_DOWNLOAD_FLAGS ?= --download=all
@@ -100,8 +100,8 @@ V ?= 0
100100101101# Use -e to double check in case it's a broken link
102102available-node = \
103- if [ -x "$(NODE)" ] && [ -e "$(NODE)" ]; then \
104-"$(NODE)" $(1); \
103+ if [ -x '$(NODE)' ] && [ -e '$(NODE)' ]; then \
104+'$(NODE)' $(1); \
105105 elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \
106106`command -v node` $(1); \
107107 else \
@@ -268,7 +268,7 @@ coverage-build: all ## Build coverage files.
268268coverage-build-js: ## Build JavaScript coverage files.
269269 mkdir -p node_modules
270270if [ ! -d node_modules/c8 ]; then \
271-$(NODE) ./deps/npm install c8 --no-save --no-package-lock;\
271+'$(NODE)' ./deps/npm install c8 --no-save --no-package-lock;\
272272fi
273273274274.PHONY: coverage-test
@@ -295,13 +295,13 @@ coverage-test: coverage-build ## Run the tests and generate a coverage report.
295295.PHONY: coverage-report-js
296296coverage-report-js: ## Report JavaScript coverage results.
297297 -$(MAKE) coverage-build-js
298-$(NODE) ./node_modules/.bin/c8 report
298+'$(NODE)' ./node_modules/.bin/c8 report
299299300300.PHONY: cctest
301301302302cctest: all ## Run the C++ tests using the built `cctest` executable.
303303 @out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER)
304-$(OUT_NODE) ./test/embedding/test-embedding.js
304+'$(OUT_NODE)' ./test/embedding/test-embedding.js
305305306306.PHONY: list-gtests
307307list-gtests: ## List all available C++ gtests.
@@ -393,7 +393,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
393393echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
394394else \
395395$(RM) -r test/addons/??_*/; \
396- [ -x $(NODE) ] && $(NODE) $< || node $< ; \
396+ [ -x '$(NODE)' ] && '$(NODE)' $< || node $< ; \
397397 [ $$? -eq 0 ] && touch $@; \
398398fi
399399@@ -613,7 +613,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes
613613$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
614614 --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
615615$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
616-$(OUT_NODE) ./test/embedding/test-embedding.js
616+'$(OUT_NODE)' ./test/embedding/test-embedding.js
617617$(info Clean up any leftover processes, error if found.)
618618 ps awwx | grep Release/node | grep -v grep | cat
619619 @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
@@ -663,8 +663,8 @@ test-wpt: all ## Run the Web Platform Tests.
663663test-wpt-report: ## Run the Web Platform Tests and generate a report.
664664$(RM) -r out/wpt
665665 mkdir -p out/wpt
666- -WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt
667-$(NODE) "$$PWD/tools/merge-wpt-reports.mjs"
666+ -WPT_REPORT=1 $(PYTHON) tools/test.py --shell '$(NODE)' $(PARALLEL_ARGS) wpt
667+'$(NODE)' "$$PWD/tools/merge-wpt-reports.mjs"
668668669669.PHONY: test-internet
670670test-internet: all ## Run internet tests.
@@ -684,7 +684,7 @@ test-doc: doc-only lint-md ## Build, lint, and verify the docs.
684684685685.PHONY: test-doc-ci
686686test-doc-ci: doc-only ## Build, lint, and verify the docs (CI).
687-$(PYTHON) tools/test.py --shell $(NODE) $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool
687+$(PYTHON) tools/test.py --shell '$(NODE)' $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool
688688689689.PHONY: test-known-issues
690690test-known-issues: all ## Run tests for known issues.
@@ -693,11 +693,11 @@ test-known-issues: all ## Run tests for known issues.
693693# Related CI job: node-test-npm
694694.PHONY: test-npm
695695test-npm: $(OUT_NODE) ## Run the npm test suite on deps/npm.
696-$(OUT_NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
696+'$(OUT_NODE)' tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
697697698698.PHONY: test-npm-publish
699699test-npm-publish: $(OUT_NODE) ## Test the `npm publish` command.
700- npm_package_config_publishtest=true $(OUT_NODE) deps/npm/test/run.js
700+ npm_package_config_publishtest=true '$(OUT_NODE)' deps/npm/test/run.js
701701702702.PHONY: test-js-native-api
703703test-js-native-api: test-build-js-native-api ## Run JS Native-API tests.
@@ -841,7 +841,7 @@ out/doc/api/assets/%: doc/api_assets/% | out/doc/api/assets
841841 @cp $< $@ ; $(RM) out/doc/api/assets/README.md
842842843843844-run-npm-ci = $(PWD)/$(NPM) ci
844+run-npm-ci = '$(PWD)/$(NPM)' ci
845845846846LINK_DATA = out/doc/apilinks.json
847847VERSIONS_DATA = out/previous-doc-versions.json
@@ -1176,7 +1176,7 @@ endif
11761176 $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
11771177 unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm
11781178 unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx
1179- $(NODE) tools/license2rtf.mjs < LICENSE > \
1179+'$(NODE)' tools/license2rtf.mjs < LICENSE > \
11801180 $(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf
11811181 cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources
11821182 pkgbuild --version $(FULLVERSION) \
@@ -1653,8 +1653,8 @@ HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo
1653165316541654.PHONY: gen-openssl
16551655ifeq ($(HAS_DOCKER), 1)
1656-DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v $(PWD):/node
1657-IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null)
1656+DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v '$(PWD):/node'
1657+IS_IN_WORKTREE = $(shell grep '^gitdir: ' '$(PWD)/.git' 2>/dev/null)
16581658GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir)
16591659DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON))
16601660gen-openssl: ## Generate platform dependent openssl files (requires docker).