summaryrefslogtreecommitdiff
path: root/src/rebar_neotoma_compiler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_neotoma_compiler.erl')
-rw-r--r--src/rebar_neotoma_compiler.erl20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/rebar_neotoma_compiler.erl b/src/rebar_neotoma_compiler.erl
index 33f32e3..b9f23f2 100644
--- a/src/rebar_neotoma_compiler.erl
+++ b/src/rebar_neotoma_compiler.erl
@@ -42,6 +42,9 @@
-export([compile/2]).
+%% for internal use only
+-export([info/2]).
+
-include("rebar.hrl").
%% ============================================================================
@@ -53,13 +56,26 @@ compile(Config, _AppFile) ->
rebar_base_compiler:run(Config, [],
option(doc_root, NeoOpts), ".peg",
option(out_dir, NeoOpts),
- option(module_ext, NeoOpts) ++ ".beam",
- fun compile_neo/3, [{check_last_mod,false}]).
+ option(module_ext, NeoOpts) ++ ".erl",
+ fun compile_neo/3, [{check_last_mod, true}]).
%% ============================================================================
%% Internal functions
%% ============================================================================
+info(help, compile) ->
+ ?CONSOLE(
+ "Build Neotoma (*.peg) sources.~n"
+ "~n"
+ "Valid rebar.config options:~n"
+ " ~p~n",
+ [
+ {neotom_opts, [{doc_root, "src"},
+ {out_dir, "src"},
+ {source_ext, ".peg"},
+ {module_ext, ""}]}
+ ]).
+
neotoma_opts(Config) ->
rebar_config:get(Config, neotoma_opts, []).