xref: /2.1.1/geocouch/rebar.config.script (revision 8997159c)
1% Add the COUCH_SRC directory to include path
2IncludeDir = case os:getenv("COUCH_SRC") of
3    false -> []; % env var not defined
4    []    -> []; % env var set to empty string
5    Dir -> [{i, Dir}, {i, Dir ++ "/../"}]
6end,
7
8% Add "makecheck" setting for testing
9MakeCheck = case os:getenv("MAKECHECK") of
10    false -> []; % env var not defined
11    []    -> []; % env var set to empty string
12    _ -> [{d, makecheck}]
13end,
14
15% Add all variables to erl_opts
16case lists:keytake(erl_opts, 1, CONFIG) of
17    false ->
18        CONFIG ++ [{erl_opts, IncludeDir ++ MakeCheck}];
19    {value, {erl_opts, ErlOpts}, Config2} ->
20        Config2 ++ [{erl_opts, ErlOpts ++ IncludeDir ++ MakeCheck}]
21end.
22