[erlang-questions] App supporting several Erlang releases

Vlad Dumitrescu vladdu55@REDACTED
Tue Jan 18 08:59:57 CET 2011


Hi,

On Tue, Jan 18, 2011 at 01:48, Joseph Wayne Norton <
norton@REDACTED> wrote:

>
> A feature was recently added to rebar to support such trickery.
>
> <https://github.com/basho/rebar/commit/5b05e54cda77d6e45fd6d1cc8ea1dabfafa6bcb1>For
> example, here is one way to handle the differences between old and new
> inets:
>
>  <https://github.com/hibari/gdss-admin/blob/master/rebar.config> %% Erlang
> compiler options
> {erl_opts, [debug_info, fail_on_warning
>            , {i, "../gmt_util/include/"}
>            , {i, "../partition_detector/include/"}
>            , {i, "../gdss_brick/include/"}
>            , {platform_define, "R13", 'old_inets'}
>           ]}.
>
>
> -ifdef(old_inets).
> -include_lib("inets/src/httpd.hrl").
> -else.
> -include_lib("inets/src/http_server/httpd.hrl").
>

Thanks for the suggestion! Using such defines per each changed API (instead
of for the whole version) is definitely a better idea.

regards,
Vlad


More information about the erlang-questions mailing list