New build system for mem3
Project: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/commit/1f97a2b7 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/tree/1f97a2b7 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mem3/diff/1f97a2b7 Branch: refs/heads/import Commit: 1f97a2b74e7e9c790c1ca93cd0ab396f56202ddc Parents: cf85661 Author: Paul J. Davis <[email protected]> Authored: Tue Mar 5 17:55:26 2013 -0600 Committer: Paul J. Davis <[email protected]> Committed: Fri Jan 17 13:53:07 2014 -0800 ---------------------------------------------------------------------- Makefile.am | 60 +++++++++++++++++++++++++++++++++++++++++ src/mem3.app.src | 28 +++++++++++++++++-- src/mem3.erl | 2 +- src/mem3_httpd.erl | 2 +- src/mem3_nodes.erl | 2 +- src/mem3_rep.erl | 2 +- src/mem3_shards.erl | 2 +- src/mem3_sync.erl | 2 +- src/mem3_sync_security.erl | 2 +- src/mem3_util.erl | 2 +- 10 files changed, 94 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..cf732ab --- /dev/null +++ b/Makefile.am @@ -0,0 +1,60 @@ +## 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. + +mem3ebindir = $(localerlanglibdir)/mem3/ebin + +mem3ebin_DATA = $(compiled_files) + +source_files = \ + src/mem3.app.src \ + src/mem3.erl \ + src/mem3_app.erl \ + src/mem3_httpd.erl \ + src/mem3_nodes.erl \ + src/mem3_rep.erl \ + src/mem3_shards.erl \ + src/mem3_sup.erl \ + src/mem3_sync.erl \ + src/mem3_sync_event.erl \ + src/mem3_sync_nodes.erl \ + src/mem3_sync_security.erl \ + src/mem3_util.erl + +compiled_files = \ + ebin/mem3.app \ + ebin/mem3.beam \ + ebin/mem3_app.beam \ + ebin/mem3_httpd.beam \ + ebin/mem3_shards.beam \ + ebin/mem3_sup.beam \ + ebin/mem3_sync.beam \ + ebin/mem3_sync_event.beam \ + ebin/mem3_sync_nodes.beam \ + ebin/mem3_sync_security.beam \ + ebin/mem3_util.beam + +# Conflicts in couch_db.hrl prevent us from building these +# until after we merge the couch application +# ebin/mem3_nodes.beam +# ebin/mem3_rep.beam + + +EXTRA_DIST = $(source_files) +CLEANFILES = $(compiled_files) + +ebin/%.app: src/%.app.src + @mkdir -p ebin/ + sed -e "s|%version%|@version@|g" < $< > $@ + +ebin/%.beam: src/%.erl + @mkdir -p ebin/ + $(ERLC) -Wall -I$(top_srcdir)/src -o ebin/ $(ERLC_FLAGS) $< http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3.app.src ---------------------------------------------------------------------- diff --git a/src/mem3.app.src b/src/mem3.app.src index 22c3d67..809b947 100644 --- a/src/mem3.app.src +++ b/src/mem3.app.src @@ -1,6 +1,20 @@ {application, mem3, [ {description, "CouchDB Cluster Membership"}, - {vsn, git}, + {vsn, "%version%"}, + {modules, [ + mem3, + mem3_app, + mem3_httpd, + mem3_nodes, + mem3_rep, + mem3_shards, + mem3_sup, + mem3_sync, + mem3_sync_event, + mem3_sync_nodes, + mem3_sync_security, + mem3_util + ]}, {mod, {mem3_app, []}}, {registered, [ mem3_events, @@ -10,5 +24,15 @@ mem3_sync_nodes, mem3_sup ]}, - {applications, [kernel, stdlib, config, sasl, crypto, mochiweb, couch, rexi, twig]} + {applications, [ + kernel, + stdlib, + config, + sasl, + crypto, + mochiweb, + couch, + rexi, + twig + ]} ]}. http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3.erl ---------------------------------------------------------------------- diff --git a/src/mem3.erl b/src/mem3.erl index 10dfac0..1b12f20 100644 --- a/src/mem3.erl +++ b/src/mem3.erl @@ -22,7 +22,7 @@ -export([quorum/1, group_by_proximity/1]). -export([live_shards/2]). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). start() -> http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_httpd.erl ---------------------------------------------------------------------- diff --git a/src/mem3_httpd.erl b/src/mem3_httpd.erl index 716080f..3d38d21 100644 --- a/src/mem3_httpd.erl +++ b/src/mem3_httpd.erl @@ -17,7 +17,7 @@ -export([handle_membership_req/1]). %% includes --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_nodes.erl ---------------------------------------------------------------------- diff --git a/src/mem3_nodes.erl b/src/mem3_nodes.erl index 7574558..39044db 100644 --- a/src/mem3_nodes.erl +++ b/src/mem3_nodes.erl @@ -19,7 +19,7 @@ -export([start_link/0, get_nodelist/0, get_node_info/2]). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -record(state, {changes_pid, update_seq}). http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_rep.erl ---------------------------------------------------------------------- diff --git a/src/mem3_rep.erl b/src/mem3_rep.erl index 64cf931..097f2dd 100644 --- a/src/mem3_rep.erl +++ b/src/mem3_rep.erl @@ -2,7 +2,7 @@ -export([go/2, go/3, changes_enumerator/3, make_local_id/2]). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -define(CTX, #user_ctx{roles = [<<"_admin">>]}). http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_shards.erl ---------------------------------------------------------------------- diff --git a/src/mem3_shards.erl b/src/mem3_shards.erl index 99e5f16..4410ff9 100644 --- a/src/mem3_shards.erl +++ b/src/mem3_shards.erl @@ -30,7 +30,7 @@ changes_pid }). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -define(DBS, mem3_dbs). http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_sync.erl ---------------------------------------------------------------------- diff --git a/src/mem3_sync.erl b/src/mem3_sync.erl index 6fda545..b661932 100644 --- a/src/mem3_sync.erl +++ b/src/mem3_sync.erl @@ -22,7 +22,7 @@ -import(queue, [in/2, out/1, to_list/1, join/2, from_list/1, is_empty/1]). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). -record(state, { http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_sync_security.erl ---------------------------------------------------------------------- diff --git a/src/mem3_sync_security.erl b/src/mem3_sync_security.erl index c436e56..723f9b7 100644 --- a/src/mem3_sync_security.erl +++ b/src/mem3_sync_security.erl @@ -17,7 +17,7 @@ -export([maybe_sync/2, maybe_sync_int/2]). -export([go/0, go/1]). --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). maybe_sync(#shard{}=Src, #shard{}=Dst) -> http://git-wip-us.apache.org/repos/asf/couchdb-mem3/blob/1f97a2b7/src/mem3_util.erl ---------------------------------------------------------------------- diff --git a/src/mem3_util.erl b/src/mem3_util.erl index 17b03c8..d1dc1a8 100644 --- a/src/mem3_util.erl +++ b/src/mem3_util.erl @@ -25,7 +25,7 @@ -define(RINGTOP, 2 bsl 31). % CRC32 space --include("mem3.hrl"). +-include_lib("mem3/include/mem3.hrl"). -include_lib("couch/include/couch_db.hrl"). hash(Item) when is_binary(Item) ->
