Fixed make clean rule not working on Windows
This commit is contained in:
parent
8dfd362fed
commit
26480fb13c
3
Makefile
3
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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user