shard-radix/Makefile
Luis Lavena 905bd9e14b Add simper spec runners (with make)
Allow usage of `make spec` to run project's specs against default
Crystal compiler or one that can be supplied with `CRYSTAL`
environment variable.

Also provide ways to run in automated mode thanks to watchexec.

[skip ci]
2017-09-22 17:57:54 -03:00

18 lines
No EOL
471 B
Makefile

CRYSTAL ?= crystal
profile ?= ## Display profiling information after specs execution
verbose ?= ## Run specs in verbose mode
SPEC_FLAGS := $(if $(profile),--profile )$(if $(verbose),--verbose )
.PHONY: default autospec spec
default: spec
# `autospec` task uses `watchexec` external dependency:
# https://github.com/mattgreen/watchexec
autospec:
watchexec --exts cr --watch spec --watch src --clear $(CRYSTAL) spec $(SPEC_FLAGS)
spec:
$(CRYSTAL) spec $(SPEC_FLAGS)