diff options
author | Eric Avdey <eiri@eiri.ca> | 2018-06-14 14:28:25 -0300 |
---|---|---|
committer | Eric Avdey <eiri@eiri.ca> | 2018-06-14 14:28:25 -0300 |
commit | 41decfa06147bf48f9ac30121cbe9ec02c23d5c7 (patch) | |
tree | 9807e0fc4744883de16103226a9948d0689dd862 | |
parent | dfa878010b27379b278f33360f2a82b814c27883 (diff) | |
download | couchdb-41decfa06147bf48f9ac30121cbe9ec02c23d5c7.tar.gz |
Allow custom compile options with env variable
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | rebar.config.script | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -76,7 +76,7 @@ help: .PHONY: couch -# target: couch - Build CouchDB core +# target: couch - Build CouchDB core, use ERL_OPTS to provide custom compiler's options couch: config.erl @COUCHDB_VERSION=$(COUCHDB_VERSION) $(REBAR) compile $(COMPILE_OPTS) @cp src/couch/priv/couchjs bin/ diff --git a/rebar.config.script b/rebar.config.script index f1a037b72..82f4d70b9 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -88,8 +88,8 @@ MakeDep = fun end, ErlOpts = case os:getenv("ERL_OPTS") of - "bin_opt_info" -> [bin_opt_info, debug_info, {i, "../"}]; - Else -> [Else, {i, "../"}] + false -> []; + Opts -> [list_to_atom(O) || O <- string:tokens(Opts, ",")] end, AddConfig = [ @@ -98,7 +98,7 @@ AddConfig = [ {deps, lists:map(MakeDep, DepDescs)}, {sub_dirs, SubDirs}, {lib_dirs, ["src"]}, - {erl_opts, ErlOpts}, + {erl_opts, [{i, "../"} | ErlOpts]}, {eunit_opts, [verbose]}, {plugins, [eunit_plugin]}, {dialyzer, [ |