-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
59 lines (36 loc) · 972 Bytes
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Load version from Logging/Version.txt
VERSION_FILE = Logging/Version.txt
VERSION = $(shell cat $(VERSION_FILE))
ROJO = rojo
ROJO_PROJECT = default.project.json
ROJO_PROJECT_TEST = test.project.json
OUT = Logging-v$(VERSION).rbxmx
OUT_TEST = Logging.rbxlx
SRC = Logging
.PHONY = test serve docs clean clean-docs clean-build clean-test
# Main build
$(OUT) : $(ROJO_PROJECT) $(SRC)
$(ROJO) build $(ROJO_PROJECT) --output $(OUT)
$(SRC) : $(shell find $(SRC) -type f)
# Test
SRC_TEST = test
test : $(OUT_TEST)
$(OUT_TEST) : $(ROJO_PROJECT_TEST) $(SRC_TEST)
$(ROJO) build $(ROJO_PROJECT_TEST) --output $(OUT_TEST)
$(SRC_TEST) : $(shell find $(SRC) -type f)
serve :
$(ROJO) serve $(ROJO_PROJECT_TEST)
# Docs
MOONWAVE = moonwave
docs : clean-docs
$(MOONWAVE) build --code $(SRC)
docs-serve :
$(MOONWAVE) dev --code $(SRC)
# Clean
clean : clean-build clean-test
clean-docs :
$(RM) -r build
clean-build :
$(RM) $(OUT)
clean-test :
$(RM) $(OUT_TEST)