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
14
priv/ec_semver_parser.peg
Normal file
14
priv/ec_semver_parser.peg
Normal file
|
@ -0,0 +1,14 @@
|
|||
semver <- major_minor_patch_min_patch ("-" alpha_part ("." alpha_part)*)? ("+" alpha_part ("." alpha_part)*)? !.
|
||||
` ec_semver:internal_parse_version(Node) ` ;
|
||||
|
||||
major_minor_patch_min_patch <- ("v"? numeric_part / alpha_part) ("." version_part)? ("." version_part)? ("." version_part)? ;
|
||||
|
||||
version_part <- numeric_part / alpha_part ;
|
||||
|
||||
numeric_part <- [0-9]+ `erlang:list_to_integer(erlang:binary_to_list(erlang:iolist_to_binary(Node)))` ;
|
||||
alpha_part <- [A-Za-z0-9]+ `erlang:iolist_to_binary(Node)` ;
|
||||
|
||||
%% This only exists to get around a bug in erlang where if
|
||||
%% warnings_as_errors is specified `nowarn` directives are ignored
|
||||
|
||||
`-compile(export_all).`
|
Loading…
Add table
Add a link
Reference in a new issue