diff --git a/Makefile b/Makefile index 3b4935e..bf2711d 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ include tools/docker/docker.mk +.SHELLFLAGS = -e -c + DOCKER := $(foreach target,$(DOCKER_TARGETS),docker.$(target)) .PHONY: all build check clean codecov docs examples libtpms package publish tests $(DOCKER) - all: clean check build check: @@ -18,12 +19,14 @@ tests: build: cargo build --release --locked +examples: + for i in $(basename $(notdir $(wildcard examples/*.rs))); do \ + cargo run --example $$i; \ + done + docs: cargo doc --no-deps --locked -examples: - set -e; for i in examples/*.rs; do cargo run --example $$(basename $$i .rs); done - format: cargo fmt --all $(if $(APPLY_FMT),,--check)