blob: 6c6f7fbd375205d29ca6cbeb1fc22aba65f9556e [file] [log] [blame]
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
% License for the specific language governing permissions and limitations under
% the License.
% Set the path to the configuration environment generated
% by `./configure`.
COUCHDB_ROOT = filename:dirname(SCRIPT).
os:putenv("COUCHDB_ROOT", COUCHDB_ROOT).
ConfigureEnv = filename:join(COUCHDB_ROOT, "config.erl").
os:putenv("COUCHDB_CONFIG", ConfigureEnv).
os:putenv("COUCHDB_APPS_CONFIG_DIR", filename:join([COUCHDB_ROOT, "rel/apps"])).
DepDescs = [
%% must be compiled first as it has a custom behavior
{couch_epi, "couch-epi", "f6ad55d804ac741b59fe37dd092787113847661c"},
{config, "config", "a83b75ef4d3dc80071ae8ae412fb0c724726d12c"},
%% keep these sorted
{b64url, "b64url", "6895652d80f95cdf04efb14625abed868998f174"},
{couch_log, "couch-log", "ad803f66dbd1900b67543259142875a6d03503ce"},
{chttpd, "chttpd", "2c1f3a3167b4b667ec8cbc5a5079911a17630753"},
{couch, "couch", "c613dabf635ca3a5d6de2240d00b80c334dc8f43"},
{couch_index, "couch-index", "53555fd909d5dd3d4a610c3fd6795950a8f7d022"},
{couch_mrview, "couch-mrview", "a0b0392afe66ece9ef3bb4fdd5a4f159c97c47eb"},
{couch_replicator, "couch-replicator", "b9232c8d410d529d65030896e075c4b4327631b0"},
{couch_plugins, "couch-plugins", "3e73b723cb126cfc471b560d17c24a8b5c540085"},
{couch_event, "couch-event", "7e382132219d708239306aa3591740694943d367"},
{couch_stats, "couch-stats", "7895d4d3f509ed24f09b6d1a0bd0e06af34551dc"},
{couch_peruser, "peruser", "4eea9571171a5b41d832da32204a1122a01f4b0e"},
{couch_tests, "erlang-tests", "37b3bfeb4b1a48a592456e67991362e155ed81e0"},
{docs, "documentation", "a135f2fe89f7b228b793aa2a8a62f0f34b576d8f", [raw]},
{ddoc_cache, "ddoc-cache", "c762e90a33ce3cda19ef142dd1120f1087ecd876"},
{ets_lru, "ets-lru", "c05488c8b1d7ec1c3554a828e0c9bf2888932ed6"},
{fabric, "fabric", "f84750e3d31accf7bcadb0ba05249c23ce920521"},
{fauxton, "fauxton", {tag, "v1.1.9"}, [raw]},
{folsom, "folsom", "a5c95dec18227c977029fbd3b638966d98f17003"},
{global_changes, "global-changes", "f6e4c5629a7d996d284e4489f1897c057823f846"},
{ibrowse, "ibrowse", "4af2d408607874d124414ac45df1edbe3961d1cd"},
{ioq, "ioq", "ba99ec70d31cf82fe4868ab4bb92b0978f4fe67f"},
{jiffy, "jiffy", "d3c00e19d8fa20c21758402231247602190988d3"},
{khash, "khash", "7c6a9cd9776b5c6f063ccafedfa984b00877b019"},
{mango, "mango", "610ccb60d09bb2a730fa1af318c6ce558538d2ba"},
{mem3, "mem3", "252467cb4a27637090b5f9006483f5b7ab551699"},
{mochiweb, "mochiweb", "bd6ae7cbb371666a1f68115056f7b30d13765782"},
{oauth, "oauth", "099057a98e41f3aff91e77e3cf496d6c6fd901df"},
{rexi, "rexi", "a327b7dbeb2b0050f7ca9072047bf8ef2d282833"},
{snappy, "snappy", "a728b960611d0795025de7e9668d06b9926c479d"},
{setup, "setup", "b9e1f3b5d5a78a706abb358e17130fb7344567d2"},
{meck, "meck", {tag, "0.8.2"}}
],
BaseUrl = "https://git-wip-us.apache.org/repos/asf/",
MakeDep = fun
({AppName, {url, Url}, Version}) ->
{AppName, ".*", {git, Url, Version}};
({AppName, {url, Url}, Version, Options}) ->
{AppName, ".*", {git, Url, Version}, Options};
({AppName, RepoName, Version}) ->
Url = BaseUrl ++ "couchdb-" ++ RepoName ++ ".git",
{AppName, ".*", {git, Url, Version}};
({AppName, RepoName, Version, Options}) ->
Url = BaseUrl ++ "couchdb-" ++ RepoName ++ ".git",
{AppName, ".*", {git, Url, Version}, Options}
end,
AddConfig = [
{require_otp_vsn, "R16B03|R16B03-1|17|18|19"},
{deps_dir, "src"},
{deps, lists:map(MakeDep, DepDescs)},
{sub_dirs, ["rel"]},
{lib_dirs, ["src/"]},
{erl_opts, [debug_info]},
{eunit_opts, [verbose]},
{plugins, [eunit_plugin]},
{dialyzer, [
{plt_location, local},
{plt_location, COUCHDB_ROOT},
{plt_extra_apps, [
asn1, compiler, crypto, inets, kernel, os_mon, runtime_tools,
sasl, ssl, stdlib, syntax_tools, xmerl]},
{warnings, [unmatched_returns, error_handling, race_conditions]}]},
{post_hooks, [{compile, "escript support/build_js.escript"}]}
],
C = lists:foldl(fun({K, V}, CfgAcc) ->
lists:keystore(K, 1, CfgAcc, {K, V})
end, CONFIG, AddConfig).