From cab42d9dbb162a6ca399d4d46dc20a5cbf4452ed Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 26 Oct 2020 20:54:43 +0300 Subject: feature: add luacov target --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 2a462d7..c4c331b 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,28 @@ -FNLSOURCES = core.fnl +FNLSOURCES = core.fnl core_test.fnl macros_test.fnl LUASOURCES = $(FNLSOURCES:.fnl=.lua) -all: cljlib.lua +all: $(LUASOURCES) -.PHONY: all clean help test +.PHONY: clean help test coverage all -cljlib.lua: test $(LUASOURCES) - mv core.lua cljlib.lua +${LUASOURCES}: $(FNLSOURCES) %.lua: %.fnl - fennel --compile $^ > $@ + fennel --compile $< > $@ clean: - rm -f *.lua + rm -f *.lua luacov* test: @fennel core_test.fnl @fennel macros_test.fnl +coverage: | clean all luacov-stats + luacov + +luacov-stats: core_test.lua macros_test.lua + @lua -lluarocks.loader -lluacov $< + help: @echo "make -- run tests and create lua library" @echo "make test -- run tests" -- cgit v1.2.3