build: fix make errors that occur in Makefile

fix make errors that occur in
 coverage-clean case and coverage-test in Makefile

PR-URL: https://github.com/nodejs/node/pull/55287
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
minkyu_kim 2024-10-14 15:41:11 +09:00 committed by GitHub
parent 129ca9e319
commit 6d36199c5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -243,7 +243,7 @@ coverage-clean: ## Remove coverage artifacts.
$(RM) -r coverage/tmp $(RM) -r coverage/tmp
@if [ -d "out/Release/obj.target" ]; then \ @if [ -d "out/Release/obj.target" ]; then \
$(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \ $(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \
-type f -exec $(RM) {};\ -type f | xargs $(RM); \
fi fi
.PHONY: coverage .PHONY: coverage
@ -269,7 +269,7 @@ coverage-build-js: ## Build JavaScript coverage files.
.PHONY: coverage-test .PHONY: coverage-test
coverage-test: coverage-build ## Run the tests and generate a coverage report. coverage-test: coverage-build ## Run the tests and generate a coverage report.
@if [ -d "out/Release/obj.target" ]; then \ @if [ -d "out/Release/obj.target" ]; then \
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {}; \ $(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f | xargs $(RM); \
fi fi
-NODE_V8_COVERAGE=coverage/tmp \ -NODE_V8_COVERAGE=coverage/tmp \
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS) TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)