diff --git a/Makefile b/Makefile index f4417f16d..e8fa05b6f 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ endif .SHELLFLAGS := -eu -o pipefail ${SHELLFLAGS} -c MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --no-builtin-rules +FIND := $(if $(wildcard /bin/find),/bin/find,/usr/bin/find) ifndef OS OS := unknown @@ -148,7 +149,7 @@ clean: clean-dist # remove any files in dist/ folder without current build hash .PHONY: clean-dist clean-dist: buildhash - find dist \! -name "*$$(cat meta/buildhash)*" -type f -delete + "${FIND}" dist \! -name "*$$(cat meta/buildhash)*" -type f -delete .PHONY: check check: pyenv buildhash prepare diff --git a/pylib/Makefile b/pylib/Makefile index 7782bdd84..5e5cba96f 100644 --- a/pylib/Makefile +++ b/pylib/Makefile @@ -72,7 +72,7 @@ clean: # Checking python ###################### -CHECKDEPS := $(shell ${FIND} anki tests -name '*.py' | grep -v buildinfo.py) +CHECKDEPS := $(shell "${FIND}" anki tests -name '*.py' | grep -v buildinfo.py) .build/mypy: $(CHECKDEPS) python -m mypy ${MYPY_ARGS} anki diff --git a/qt/Makefile b/qt/Makefile index d4687647e..2ebee6968 100644 --- a/qt/Makefile +++ b/qt/Makefile @@ -42,7 +42,7 @@ all: check python -m pip install -r requirements.dev @touch $@ -.build/ui: $(shell ${FIND} designer -type f) +.build/ui: $(shell "${FIND}" designer -type f) ./tools/build_ui.sh @touch $@ @@ -96,7 +96,7 @@ JSDEPS := $(patsubst ts/src/%.ts, web/%.js, $(TSDEPS)) PYLIB := ../pylib -CHECKDEPS := $(shell ${FIND} aqt tests -name '*.py' | grep -v buildinfo.py) +CHECKDEPS := $(shell "${FIND}" aqt tests -name '*.py' | grep -v buildinfo.py) .build/mypy: $(CHECKDEPS) .build/qt-stubs python -m mypy ${MYPY_ARGS} aqt diff --git a/rslib/Makefile b/rslib/Makefile index 94bb7432d..4f5eb06aa 100644 --- a/rslib/Makefile +++ b/rslib/Makefile @@ -30,7 +30,7 @@ develop: .build/vernum ftl/repo ftl/repo: (cd ftl && ./scripts/fetch-latest-translations) -ALL_SOURCE := $(shell ${FIND} src -type f | egrep -v "i18n/autogen|i18n/ftl|_proto.rs") $(wildcard ftl/*.ftl) +ALL_SOURCE := $(shell "${FIND}" src -type f | egrep -v "i18n/autogen|i18n/ftl|_proto.rs") $(wildcard ftl/*.ftl) # nightly currently required for ignoring files in rustfmt.toml RUST_TOOLCHAIN := $(shell cat rust-toolchain) diff --git a/rspy/Makefile b/rspy/Makefile index d6ef32f5c..7506608dc 100644 --- a/rspy/Makefile +++ b/rspy/Makefile @@ -50,9 +50,9 @@ develop: .build/develop DEPS := .build/tools .build/vernum ../meta/buildhash \ $(wildcard $(QT_FTL_TEMPLATES)/*.ftl) \ $(wildcard $(QT_FTL_LOCALES)/*/*.ftl) \ - $(shell ${FIND} ../rslib/src -name '*.rs') $(wildcard ../proto/*) \ - $(shell ${FIND} ../rslib/ftl -type f) \ - $(shell ${FIND} ./src -type f) + $(shell "${FIND}" ../rslib/src -name '*.rs') $(wildcard ../proto/*) \ + $(shell "${FIND}" ../rslib/ftl -type f) \ + $(shell "${FIND}" ./src -type f) .build/develop: $(DEPS) touch ../proto/backend.proto