Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraisinten <raisinten@gmail.com>2021-01-04 18:11:57 +0300
committerMichaƫl Zasso <targos@protonmail.com>2021-05-01 13:24:53 +0300
commit5c74dc7227630fca65b1183cfe33e13ebbac23b4 (patch)
tree9251b16868ae61c7a48ba64345996290c3d9abea /Makefile
parentea0b0697c34f7abe61be8382a9c7c80a83553ca9 (diff)
build: refactor Makefile
* add character classes * replace echo -n with printf Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/36759 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ef622e504a1..ad5f801f639 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ FLAKY_TESTS ?= run
TEST_CI_ARGS ?=
STAGINGSERVER ?= node-www
LOGLEVEL ?= silent
-OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
+OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]')
COVTESTS ?= test-cov
COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
GTEST_FILTER ?= "*"
@@ -40,7 +40,7 @@ ifeq ($(OSTYPE), darwin)
GCOV = xcrun llvm-cov gcov
endif
-BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]')
+BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[:upper:]' '[:lower:]')
# Determine EXEEXT
EXEEXT := $(shell $(PYTHON) -c \
@@ -85,7 +85,7 @@ endif
# To add a target to the help, add a double comment (##) on the target line.
help: ## Print help for targets with comments.
@printf "For more targets and info see the comments in the Makefile.\n\n"
- @grep -E '^[a-zA-Z0-9._-]+:.*?## .*$$' Makefile | sort | \
+ @grep -E '^[[:alnum:]._-]+:.*?## .*$$' Makefile | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
# The .PHONY is needed to ensure that we recursively use the out/Makefile
@@ -243,10 +243,10 @@ coverage-test: coverage-build
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
-r Release/obj.target --html --html-detail -o ../coverage/cxxcoverage.html \
--gcov-executable="$(GCOV)")
- @echo -n "Javascript coverage %: "
+ @printf "Javascript coverage %%: "
@grep -B1 Lines coverage/index.html | head -n1 \
| sed 's/<[^>]*>//g'| sed 's/ //g'
- @echo -n "C++ coverage %: "
+ @printf "C++ coverage %%: "
@grep -A3 Lines coverage/cxxcoverage.html | grep style \
| sed 's/<[^>]*>//g'| sed 's/ //g'
@@ -1359,7 +1359,7 @@ lint: ## Run JS, C++, MD and doc linters.
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
-CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
+CONFLICT_RE=^>>>>>>> [[:xdigit:]]+|^<<<<<<< [[:alpha:]]+
# Related CI job: node-test-linter
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs