forked from lycus/flect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
83 lines (60 loc) · 1.62 KB
/
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
-include config.mak
RM ?= rm
TIME ?= time
INSTALL ?= install
ELIXIR ?= elixir
MIX ?= mix
DIALYZER ?= dialyzer
TESTS = test-lex-pass \
test-lex-fail \
test-pp-pass \
test-pp-fail \
test-parse-pass \
test-parse-fail
.PHONY: all docs escript ebin clean distclean test dialyze install uninstall $(TESTS)
all: ebin/flect
config.mak:
@$(ELIXIR) config.exs
test: $(TESTS)
override RUN_TEST = $(TIME) -p $(ELIXIR) --erl "-noinput +B -kernel error_logger silent" -pz ebin test.exs
test-lex-pass: ebin/flect.app
@$(RUN_TEST) tests/lex-pass
test-lex-fail: ebin/flect.app
@$(RUN_TEST) tests/lex-fail
test-pp-pass: ebin/flect.app
@$(RUN_TEST) tests/pp-pass
test-pp-fail: ebin/flect.app
@$(RUN_TEST) tests/pp-fail
test-parse-pass: ebin/flect.app
@$(RUN_TEST) tests/parse-pass
test-parse-fail: ebin/flect.app
@$(RUN_TEST) tests/parse-fail
docs: ebin/flect.app
@$(MIX) docs
escript: ebin/flect
ebin/flect: ebin/flect.app
@$(MIX) escriptize
ebin: ebin/flect.app
ebin/flect.app: $(wildcard lib/*.ex) $(wildcard lib/*/*.ex) $(wildcard lib/*/*/*.ex)
@$(MIX) compile
clean:
@$(MIX) clean --all
$(RM) *.dump
distclean: clean
$(RM) config.mak
dialyze: ebin/flect.app
@$(DIALYZER) --no_check_plt -r ebin \
-Wunmatched_returns \
-Werror_handling \
-Wrace_conditions
install: ebin/flect
$(INSTALL) -m755 -d $(FLECT_PREFIX)
$(INSTALL) -m755 -d $(FLECT_BIN_DIR)
$(INSTALL) -m755 -d $(FLECT_LIB_DIR)
$(INSTALL) -m755 -d $(FLECT_ST_LIB_DIR)
$(INSTALL) -m755 -d $(FLECT_SH_LIB_DIR)
$(INSTALL) -m755 ebin/flect $(FLECT_BIN_DIR)
uninstall:
$(RM) $(FLECT_BIN_DIR)/flect
$(RM) -r $(FLECT_ST_LIB_DIR)/*
$(RM) -r $(FLECT_SH_LIB_DIR)/*