summaryrefslogtreecommitdiff
path: root/src/rebar_dia_compiler.erl
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-11-10 21:59:19 +0100
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-12-31 20:45:11 +0100
commit4b8c81fb53e2caaa74a33d5b62664a67427a7bbf (patch)
tree108c21849e5acf68e0e5f621bc9132a960b6dea7 /src/rebar_dia_compiler.erl
parent78fa8fc3d5215e076284b37394e5ca149e945997 (diff)
Implement 'rebar help CMD1 CMD2' and extend common 'rebar help' msg
* allow plugins to print help message for implemented commands * append core rebar.config options to common 'rebar help' message
Diffstat (limited to 'src/rebar_dia_compiler.erl')
-rw-r--r--src/rebar_dia_compiler.erl20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rebar_dia_compiler.erl b/src/rebar_dia_compiler.erl
index 51c075b..f81c734 100644
--- a/src/rebar_dia_compiler.erl
+++ b/src/rebar_dia_compiler.erl
@@ -28,6 +28,9 @@
-export([compile/2, clean/2]).
+%% for internal use only
+-export([info/2]).
+
-include("rebar.hrl").
%% ===================================================================
@@ -46,6 +49,23 @@ clean(_Config, _AppFile) ->
ok = rebar_file_utils:delete_each(GeneratedFiles),
ok.
+%% ===================================================================
+%% Internal functions
+%% ===================================================================
+
+info(help, compile) ->
+ info_help("Build Diameter (*.dia) sources");
+info(help, clean) ->
+ info_help("Delete generated Diameter files").
+
+info_help(Description) ->
+ ?CONSOLE(
+ "~s.~n"
+ "~n"
+ "Valid rebar.config options:~n"
+ " {dia_opts, []} (see diameter_codegen:from_dict/4 documentation)~n",
+ [Description]).
+
-spec compile_dia(file:filename(), file:filename(),
rebar_config:config()) -> ok.
compile_dia(Source, Target, Config) ->