Permalink
Browse files

Convert ns_server build to rebar

Change-Id: I360cb6f940bb10a0cebd06cd23f9839db2a058c0
Reviewed-on: http://review.membase.org/4455
Reviewed-by: Sean Lynch <seanlynch5@gmail.com>
Tested-by: Sean Lynch <seanlynch5@gmail.com>
  • Loading branch information...
1 parent 23893f4 commit 625638a11daeda7c972a8c82476249832ca74282 Dale Harvey committed with Sean Lynch Feb 8, 2011
Showing with 13 additions and 26 deletions.
  1. +0 −9 Emakefile
  2. +6 −6 Makefile
  3. +0 −2 deps/gen_smtp/Emakefile
  4. +2 −2 deps/gen_smtp/Makefile
  5. +0 −6 deps/menelaus/Emakefile
  6. +3 −1 deps/menelaus/Makefile
  7. +1 −0 deps/menelaus/rebar.config
  8. BIN rebar
  9. +1 −0 rebar.config
View
@@ -1,9 +0,0 @@
-{'src/*', [debug_info,
- {outdir, "ebin"},
- {i, "include"},
- %% warnings_as_errors,
- warn_export_all,
- warn_unused_import
- ]}.
-{'test/*',
- [debug_info, {outdir, "ebin"}, {i, "include"}]}.
View
@@ -13,9 +13,11 @@ TEST_TARGET=start
DOC_DIR?=./docs/erldocs
+REBAR=./rebar
+
.PHONY: ebins ebin_app version
-all: ebins deps_all
+all: ebins ebin_app deps_all
deps_menelaus:
(cd deps/menelaus && $(MAKE) all)
@@ -28,13 +30,11 @@ deps_all: deps_menelaus deps_smtp
docs:
priv/erldocs $(DOC_DIR)
-ebins: ebin_app
- test -d ebin || mkdir ebin
- erl -noinput +B $(EFLAGS) -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
+ebins:
+ $(REBAR) compile
ebin_app: version
- test -d ebin || mkdir ebin
- sed s/0.0.0/`cat $(TMP_VER)`/g src/ns_server.app.src > ebin/ns_server.app
+ sed -i "" s/0.0.0/`cat $(TMP_VER)`/g ebin/ns_server.app
version:
test -d $(TMP_DIR) || mkdir $(TMP_DIR)
View
@@ -1,2 +0,0 @@
-{'src/*', [debug_info, {outdir, "ebin"},
- {i, "include"}]}.
View
@@ -1,12 +1,12 @@
SHELL=/bin/sh
+REBAR=../../rebar
.PHONY: ebins
all: ebins
ebins:
- test -d ebin || mkdir ebin
- erl -noinput +B $(EFLAGS) -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
+ $(REBAR) compile
clean:
rm -rf ebin
View
@@ -1,6 +0,0 @@
-{'src/*', [debug_info,
- {outdir, "ebin"},
- {i, "include"},
- {i, "../ns_server/include"},
- {i, "../../pull_make_ns_server/ns_server/include"},
- {i, "../../include"}]}.
View
@@ -4,14 +4,16 @@ TMP_DIR=./tmp
TMP_VER=$(TMP_DIR)/version_num.tmp
DIST_DIR=$(TMP_DIR)/menelaus
SPROCKETIZE=sprocketize
+REBAR=../../rebar
.PHONY: ebins ebin_app version
all: deps priv/public/js/all.js ebins
ebins: ebin_app
test -d ebin || mkdir ebin
- erl -noinput +B $(EFLAGS) -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
+ $(REBAR) compile
+#erl -noinput +B $(EFLAGS) -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
ebin_app: version
test -d ebin || mkdir ebin
@@ -0,0 +1 @@
+{erl_opts, [{i, "../../include"}]}.
View
BIN rebar
Binary file not shown.
View
@@ -0,0 +1 @@
+{erl_opts, [{src_dirs, ["test"]}]}.

0 comments on commit 625638a

Please sign in to comment.