.PHONY: test check clippy fmt
CRATES=$(dir $(wildcard **/Cargo.toml))
define run_on_crates
failed=false; \
echo '<base>'; \
cargo +nightly $(1) $(EXTRA) || failed=true; \
for dir in $(CRATES); do \
echo "$$dir"; \
cd "$$dir"; \
cargo +nightly $(1) $(EXTRA) || failed=true; \
cd ..; \
done; \
if [ "$$failed" = "true" ]; then exit 1; fi
endef
test:
$(call run_on_crates, test)
check:
$(call run_on_crates, check)
clippy:
$(call run_on_crates, clippy)
fmt:
$(call run_on_crates, fmt)