summaryrefslogtreecommitdiff
path: root/Makefile
blob: c4c331bb925c6f9724fae66637fb6456388c715e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FNLSOURCES = core.fnl core_test.fnl macros_test.fnl
LUASOURCES = $(FNLSOURCES:.fnl=.lua)

all: $(LUASOURCES)

.PHONY: clean help test coverage all

${LUASOURCES}: $(FNLSOURCES)

%.lua: %.fnl
	fennel --compile $< > $@

clean:
	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"
	@echo "make clean -- remove lua files"