diff --git a/Makefile b/Makefile index 65a37c8..51f928f 100644 --- a/Makefile +++ b/Makefile @@ -30,9 +30,18 @@ PACKAGE_MANAGER=cargo # CGO_ENABLED=0 .MAIN: test/coverage -.PHONY: all clean coverage dependencies help list test +.PHONY: all build clean coverage dependencies env format help list test .EXPORT_ALL_VARIABLES: # (2) +define crono + @start=$$(date +%s); \ + $(1); \ + end=$$(date +%s); \ + diff=$$((end - start)); \ + printf "Total time: %02d:%02d:%02d\n" $$((diff/3600)) $$((diff%3600/60)) $$((diff%60)) +endef + + help: list list: @@ -137,7 +146,8 @@ compose/test: compose/build compose/run: compose/build ${DOCKER_COMPOSE} --profile production run --rm algorithm-exercises-rust -all: test coverage +all: + $(call crono, make clean; make dependencies; make build; make test; make lint; make coverage/html) run: ls -alh