Make proper and neotoma dev-only dependencies
This patch makes erlware_commons easier to include as a dependency by removing depedencies that are not needed at run time. The top-level Makefile creates a .DEV_MODE marker file which is detected by rebar.config.script. When the marker file is present, the development only dependencies proper and neotoma are included and a macro 'DEV_ONLY' is defined. The macro is used to only enable the proper tests for development mode. The ec_semver_parser.peg is now located in priv/ and is moved into src/ by the Makefile. The generated ec_semver_parser.erl is now under version control; it need not be rebuilt by all projects wishing to include erlware_commons. It will be rebuilt, as before this change, on every make invocation.
This commit is contained in:
parent
38cd7a4d62
commit
d9c6ec1d28
7 changed files with 286 additions and 20 deletions
|
@ -5,6 +5,8 @@
|
|||
%% proper:module(ec_dictionary_proper).
|
||||
-module(ec_dictionary_proper).
|
||||
|
||||
-ifdef(DEV_ONLY).
|
||||
|
||||
-export([my_dict/0, dict/1, sym_dict/0, sym_dict/1, gb_tree/0, gb_tree/1, sym_dict2/0]).
|
||||
|
||||
-include_lib("proper/include/proper.hrl").
|
||||
|
@ -221,3 +223,4 @@ gb_tree(0) ->
|
|||
gb_tree(N) ->
|
||||
gb_trees:enter(key(),value(),gb_tree(N-1)).
|
||||
|
||||
-endif.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue