One step closer for better code abstraction for opensorce vs enterprise
So far this relocation is to make opensource to enterprise merges
conflict free.
The implementation prior to this commit supports
only one gc enforcement policy which is message count threshold.
The new implementation introduces 1 more: volume threshold based
* Rebar3 and erlang.mk dual support.
There was only erlang.mk support prior to this change.
The main reasons for this dual support are:
* Cover report upload can only be done by rebar3 in travis.ci
* We want to prepare for the future to build emqx releases using rebar3
* We do not want to stop supporting erlang.mk in one single step
* Add depencency version consistency check between erlang.mk and rebar.config
Prior to this change, the template file etc/emqx.conf is used
directly in testing, as a result, mustache style directories
are created e.g. `{{ platform_log_dir }}` which should have been
replaced with a config varialbe e.g. `log`
In this change, Makefile targets are added as `ct` dependency
to download bbmustach, load the template input, replace with
variableds defined in 'vars' file, finally to etc/gen.emqx.conf.
The direct usage of etc/emqx.conf in test code are replaced with
gen.emqx.conf
Having src/emqttd.app.src allows rebar family of build tools
(rebar2, and rebar3) to be used to compile emqttd. This is important
to allow plugins to be written using rebar3, to lock dependencies.
rebar.lock contains references to commits or hashes of dependencies
and is used by rebar3 to allow repeatable builds.
This is important since without it, updates to dependencies are
silently pulled and it is impractical to replicate a build properly.
However, this adds an additional maintenance effort. Periodically,
the lock file must be updated using rebar3 upgrade, and app.src
must be updated when adding new dependencies.
Note that erlang.mk does not respect dependency locking currently,
and does not benefit from rebar.lock.
_build is used by rebar3 and mix for storing built artifacts.