diff options
| author | Andrey Orst <andreyorst@gmail.com> | 2020-10-26 20:54:43 +0300 |
|---|---|---|
| committer | Andrey Orst <andreyorst@gmail.com> | 2020-10-26 20:57:06 +0300 |
| commit | cab42d9dbb162a6ca399d4d46dc20a5cbf4452ed (patch) | |
| tree | c34aaf6b8e7160342c39bef7cc9ebf5f1b313050 | |
| parent | d4da5f6c16f9fbbedb4f6b1fdcc0d617b3241219 (diff) | |
feature: add luacov target
| -rw-r--r-- | Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -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" |