Configuration File


mad uses rebar.config filename to load mad configuration. Despite mad is no fully rebar compatible (e.g. it can’t uses rebar plugins, ports compilation is rather different, etc), it uses its name to achive certail level of compatibility.


deps is the core option of mad. It says which OTP applications shold be used and where they could be found. Yoy may also specify versions. Here is simpliest example:

Listing 1: deps Option

{deps, [ {kvs, ".*", {git,"git://"}}, {forms, ".*", {git,"git://"}} ]}.


To specify where deps should be stored after fetching inside your application you use deps_dir option:

Listing 2: deps_dir Option

{deps_dir, "deps"}.


If your application consist of more than one src directory, you may specify all of the sub-applications. Each sub-application should be valid OTP application with its own rebar.config configuration file.



To use include directive across your sub-applications you should specify the lib_dirs directories which will be settled as include directories during compilation.


E.g. you have my_app and my_server applications inside apps directory and you including HRL file from my_server application from ap_app application:

-module(my_app). -include_lib("my_server/include/my_server.hrl").


Events | Privacy Policy | Feedback | Brandbook
Copyright © 2005–2018 Synrc Research Center s.r.o.