mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Add debug flag to make it easier to get a debug version of rebar
This commit is contained in:
parent
f2244b26be
commit
465af36266
1 changed files with 9 additions and 0 deletions
|
@ -18,8 +18,17 @@ main(Args) ->
|
||||||
rm("ebin/rebar_core.beam")
|
rm("ebin/rebar_core.beam")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
%% Add check for debug flag
|
||||||
|
case lists:member("debug", Args) of
|
||||||
|
true ->
|
||||||
|
DebugFlag = debug_info;
|
||||||
|
false ->
|
||||||
|
DebugFlag = undefined
|
||||||
|
end,
|
||||||
|
|
||||||
%% Compile all src/*.erl to ebin
|
%% Compile all src/*.erl to ebin
|
||||||
case make:files(filelib:wildcard("src/*.erl"), [{outdir, "ebin"}, {i, "include"},
|
case make:files(filelib:wildcard("src/*.erl"), [{outdir, "ebin"}, {i, "include"},
|
||||||
|
DebugFlag,
|
||||||
{d, 'BUILD_TIME', Built},
|
{d, 'BUILD_TIME', Built},
|
||||||
{d, 'VCS_INFO', VcsInfo}]) of
|
{d, 'VCS_INFO', VcsInfo}]) of
|
||||||
up_to_date ->
|
up_to_date ->
|
||||||
|
|
Loading…
Reference in a new issue