Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 73 lines (55 sloc) 1.78 kb
b2e3534 @evanmiller * Added unit test suite covering most tags that don't require file IO. P...
evanmiller authored
1 ERL=erl
fcc1f31 @kaos Add support for the extension module in the parser.
kaos authored
2 ERLC=erlc
9af4b7d @kaos Switch to new slex based scanner.
kaos authored
3 REBAR=./rebar $(REBAR_ARGS)
48b9b5f @gardenia Added "now" tag and associated associated dateformat module.
gardenia authored
4
9b1a886 @kaos Revert a change from commit 51bb1f2387b2ae839637134bb72eda627b63ec85.
kaos authored
5 all: compile
d8db1a5 @hdima Run must depend on compile
hdima authored
6
0e5635c @kaos Make sure merl gets built when using rebar (#123)
kaos authored
7 compile: check-slex get-deps
45c9c57 @evanmiller Use rebar for builds.
evanmiller authored
8 @$(REBAR) compile
9
9af4b7d @kaos Switch to new slex based scanner.
kaos authored
10 check-slex: src/erlydtl_scanner.erl
11 src/erlydtl_scanner.erl: src/erlydtl_scanner.slex
12 @echo Notice: $@ is outdated by $<, consider running "'make slex'".
13
0e5635c @kaos Make sure merl gets built when using rebar (#123)
kaos authored
14 get-deps:
a1c9198 @kaos Use merl [1] for compiling the erlang AST tree (fixes #123).
kaos authored
15 @$(REBAR) get-deps
16
0e5635c @kaos Make sure merl gets built when using rebar (#123)
kaos authored
17 update-deps:
a1c9198 @kaos Use merl [1] for compiling the erlang AST tree (fixes #123).
kaos authored
18 @$(REBAR) update-deps
19
1a1140a @kaos Drop old tests (fixes #134)
kaos authored
20 .PHONY: tests
51bb1f2 @kaos Run tests on `make all`.
kaos authored
21 tests: src/erlydtl_parser.erl
1a250bf @kaos Migrating tests to eunit (#134)
kaos authored
22 @$(REBAR) eunit
d9af9e1 @davidw Added in a newer rebar, and the pmod_pt parse transform.
davidw authored
23
1a1140a @kaos Drop old tests (fixes #134)
kaos authored
24 check: tests dialyze
c270102 @kaos Add check and dialyze targets (#111)
kaos authored
25
68f90ec @danikp mostly travis-ci stuff
danikp authored
26 ## dialyzer
27 PLT_FILE = ~/erlydtl.plt
28 PLT_APPS ?= kernel stdlib compiler erts eunit syntax_tools
29 DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \
30 -Wunderspecs --verbose --fullpath
31 .PHONY: dialyze
a4ac286 @kaos let travis make check to run the dialyzer too.
kaos authored
32 dialyze: compile
33 @[ -f $(PLT_FILE) ] || $(MAKE) plt
68f90ec @danikp mostly travis-ci stuff
danikp authored
34 @dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ];
c270102 @kaos Add check and dialyze targets (#111)
kaos authored
35
36 ## In case you are missing a plt file for dialyzer,
37 ## you can run/adapt this command
68f90ec @danikp mostly travis-ci stuff
danikp authored
38 .PHONY: plt
a4ac286 @kaos let travis make check to run the dialyzer too.
kaos authored
39 plt: compile
68f90ec @danikp mostly travis-ci stuff
danikp authored
40 # we need to remove second copy of file
41 rm -f deps/merl/priv/merl_transform.beam
42 @echo "Building PLT, may take a few minutes"
43 @dialyzer --build_plt --output_plt $(PLT_FILE) --apps \
44 $(PLT_APPS) deps/* || [ $$? -eq 2 ];
c270102 @kaos Add check and dialyze targets (#111)
kaos authored
45
f84b2a8 @rsaccon initial commit
rsaccon authored
46 clean:
a1c9198 @kaos Use merl [1] for compiling the erlang AST tree (fixes #123).
kaos authored
47 @echo "Clean merl..." ; $(MAKE) -C deps/merl clean
16f9978 @kaos make clean also for slex.
kaos authored
48 @$(REBAR) -C rebar-slex.config clean
45c9c57 @evanmiller Use rebar for builds.
evanmiller authored
49 rm -fv erl_crash.dump
9af4b7d @kaos Switch to new slex based scanner.
kaos authored
50
a4ac286 @kaos let travis make check to run the dialyzer too.
kaos authored
51 really-clean: clean
52 rm -f $(PLT_FILE)
53
9af4b7d @kaos Switch to new slex based scanner.
kaos authored
54 # rebuild any .slex files as well.. not included by default to avoid
55 # the slex dependency, which is only needed in case the .slex file has
56 # been modified locally.
57 slex: REBAR_DEPS ?= get-deps update-deps
58 slex: slex-compile
59
60 slex-skip-deps: REBAR_DEPS:=
61 slex-skip-deps: slex-compile
62
63 slex-compile:
64 @$(REBAR) -C rebar-slex.config $(REBAR_DEPS) compile
a0b58de @kaos New debug options to not lean on the debug_info option (fixes #139)
kaos authored
65
66 shell:
67 @$(ERL) -pz ebin deps/*/ebin
51bb1f2 @kaos Run tests on `make all`.
kaos authored
68
69
70 # this file must exist for rebar eunit to work
71 # but is only built when running rebar compile
72 src/erlydtl_parser.erl: compile
Something went wrong with that request. Please try again.