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:
authorThomas <hakerh403@gmail.com>2020-04-28 22:34:22 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2020-06-30 19:33:46 +0300
commitf55453f570ba388a7b1bc73f7cef849dc4b01a94 (patch)
tree9240e78ca1c7ad80c0518d999cfe09912ff4ec10 /Makefile
parentde69354521eb8030aed8a667cad67d12118773c0 (diff)
build: fix makefile script on windows
On Windows there is a program "find.exe" located in C:\Windows\System32, which is usually in the PATH before MSYS version of that program (required for running makefile). The Windows version of the program uses different CLI syntax, which results in errors like "File not found - *node_modules*" This commit specifies the full path to the program, which is also properly handled by MSYS on Windows. PR-URL: https://github.com/nodejs/node/pull/33136 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ca400962a9d..7a6e3d5c32d 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,7 @@ GNUMAKEFLAGS += --no-print-directory
GCOV ?= gcov
PWD = $(CURDIR)
BUILD_WITH ?= make
+FIND ?= find
ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
@@ -168,7 +169,7 @@ uninstall: ## Uninstalls node from $PREFIX (default=/usr/local).
clean: ## Remove build artifacts.
$(RM) -r out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) \
out/$(BUILDTYPE)/node.exp
- @if [ -d out ]; then find out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs $(RM) -r; fi
+ @if [ -d out ]; then $(FIND) out/ -name '*.o' -o -name '*.a' -o -name '*.d' | xargs $(RM) -r; fi
$(RM) -r node_modules
@if [ -d deps/icu ]; then echo deleting deps/icu; $(RM) -r deps/icu; fi
$(RM) test.tap
@@ -1204,7 +1205,7 @@ LINT_MD_NEWER = -newer tools/.mdlintstamp
endif
LINT_MD_TARGETS = doc src lib benchmark test tools/doc tools/icu $(wildcard *.md)
-LINT_MD_FILES = $(shell find $(LINT_MD_TARGETS) -type f \
+LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
! -path '*node_modules*' ! -path 'test/fixtures/*' -name '*.md' \
$(LINT_MD_NEWER))
run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES)
@@ -1383,7 +1384,7 @@ CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
# Related CI job: node-test-linter
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
@if ! ( grep -IEqrs "$(CONFLICT_RE)" benchmark deps doc lib src test tools ) \
- && ! ( find . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
+ && ! ( $(FIND) . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
exit 0 ; \
else \
echo "" >&2 ; \