mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
build: fix inconsistent quoting in Makefile
PR-URL: https://github.com/nodejs/node/pull/60511 Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
1 file changed
+26
-26
@@ -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
|
||||
@@ -83,11 +83,11 @@ NPM ?= ./deps/npm/bin/npm-cli.js
|
||||
|
||||
# Release build of node.
|
||||
# Use $(PWD) so we can cd to anywhere before calling this.
|
||||
NODE ?= "$(PWD)/$(NODE_EXE)"
|
||||
NODE ?= $(PWD)/$(NODE_EXE)
|
||||
# Prefer $(OUT_NODE) when running tests. Use $(NODE)
|
||||
# when generating coverage reports or running toolings as
|
||||
# debug build is be slower.
|
||||
OUT_NODE ?= "$(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)"
|
||||
OUT_NODE ?= $(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)
|
||||
|
||||
# Flags for packaging.
|
||||
BUILD_DOWNLOAD_FLAGS ?= --download=all
|
||||
@@ -100,8 +100,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 \
|
||||
@@ -268,7 +268,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
|
||||
@@ -295,13 +295,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)
|
||||
$(OUT_NODE) ./test/embedding/test-embedding.js
|
||||
'$(OUT_NODE)' ./test/embedding/test-embedding.js
|
||||
|
||||
.PHONY: list-gtests
|
||||
list-gtests: ## List all available C++ gtests.
|
||||
@@ -393,7 +393,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
|
||||
|
||||
@@ -613,7 +613,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)
|
||||
$(OUT_NODE) ./test/embedding/test-embedding.js
|
||||
'$(OUT_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}'`; \
|
||||
@@ -663,8 +663,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.
|
||||
@@ -684,7 +684,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.
|
||||
@@ -693,11 +693,11 @@ test-known-issues: all ## Run tests for known issues.
|
||||
# Related CI job: node-test-npm
|
||||
.PHONY: test-npm
|
||||
test-npm: $(OUT_NODE) ## Run the npm test suite on deps/npm.
|
||||
$(OUT_NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
|
||||
'$(OUT_NODE)' tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
|
||||
|
||||
.PHONY: test-npm-publish
|
||||
test-npm-publish: $(OUT_NODE) ## Test the `npm publish` command.
|
||||
npm_package_config_publishtest=true $(OUT_NODE) deps/npm/test/run.js
|
||||
npm_package_config_publishtest=true '$(OUT_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.
|
||||
@@ -841,7 +841,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
|
||||
@@ -1176,7 +1176,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) \
|
||||
@@ -1653,8 +1653,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).
|
||||
|
||||
Reference in new issue
Block a user