Skip to content
Browse files

Uses updated elixir that is more rebar-friendly now

  • Loading branch information...
1 parent 240c97a commit 45cf8615131408b0ea933992ab5f3b8a2a4caac0 @yrashk committed
Showing with 10 additions and 13 deletions.
  1. +6 −10 Makefile
  2. +2 −1 plugins/rebar_elixir_compiler.erl
  3. +2 −2 rebar.config
View
16 Makefile
@@ -1,14 +1,10 @@
all: compile
-deps/elixir/rel/elixir/bin/elixir:
- @git clone https://github.com/elixir-lang/elixir deps/elixir
- @cd deps/elixir && git checkout 7e068aca85f9528bebe210781ac584214e9b794d
- @cd deps/elixir && make release_erl
+deps/elixir:
+ @./rebar get-deps
-prepare: deps/elixir/rel/elixir/bin/elixir
+compile: deps/elixir
+ @ERL_LIBS=`pwd`/deps/elixir/lib ./rebar compile
-compile:
- @ERL_LIBS=`pwd`/deps/elixir/rel/elixir/lib ./rebar compile
-
-iex: prepare
- @ERL_LIBS=deps `pwd`/deps/elixir/rel/elixir/bin/iex -pa ebin
+iex:
+ @ERL_LIBS=deps `pwd`/deps/elixir/bin/iex -pa ebin
View
3 plugins/rebar_elixir_compiler.erl
@@ -87,7 +87,8 @@ dotex_compile(Config, OutDir) ->
dotex_compile(Config, OutDir, MoreSources) ->
App = application:load(elixir),
- Loaded = (App == ok orelse App == {error, {already_loaded, elixir}}),
+ Loaded = (App == ok orelse App == {error, {already_loaded, elixir}}) and
+ (code:ensure_loaded(elixir) == {module, elixir}),
case Loaded of
true ->
application:start(elixir),
View
4 rebar.config
@@ -1,4 +1,4 @@
{plugins, [rebar_elixir_compiler]}.
-{lib_dirs, ["deps","deps/elixir/rel/elixir/lib"]}.
-{pre_hooks, [{compile, "make prepare"}]}.
+{lib_dirs, ["deps","deps/elixir/lib/elixir/ebin"]}.
{ex_first_files, ["lib/exql.ex","lib/expr.ex"]}.
+{deps, [{elixir, ".*", {git, "https://github.com/elixir-lang/elixir", {tag, "0f96f40"}}}]}.

0 comments on commit 45cf861

Please sign in to comment.
Something went wrong with that request. Please try again.