-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 741 Bytes
/
Makefile
File metadata and controls
39 lines (31 loc) · 741 Bytes
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
30
31
32
33
34
35
36
37
38
39
MOONCFLAGS=
BUSTEDFLAGS=
DISTDIR=
LOVEPUNK_SRCS = $(shell find LunoPunk -iname '*.moon')
LOVEPUNK_OBJS = $(patsubst %.moon,%.lua,$(LOVEPUNK_SRCS))
all: $(LOVEPUNK_OBJS)
test: tests/mock_love.moon
busted tests
ci: tests/mock_love.moon
busted -o plainTerminal -c tests
# Dependencies
tests/mock_love.moon:
@mkdir -p tmp
@cp tests/generate_love_mock.moon tmp/main.moon
@moonc tmp/main.moon
@love tmp
@mv mock_love.moon tests
@rm -fr tmp
%.lua: %.moon
moonc ${MOONCFLAGS} -p $< > $@
ifneq ($(strip $(DISTDIR)),)
@mkdir -p $(DISTDIR)/$(@D)
@cp $@ $(DISTDIR)/$@
endif
clean:
rm -f $(LOVEPUNK_OBJS) tests/mock_love.moon coveralls/busted.lua
ifneq ($(strip $(DISTDIR)),)
rm -fr $(DISTDIR)
endif
# Targets
.PHONY: clean all test