summaryrefslogtreecommitdiff
path: root/make.erl
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2014-11-13 19:25:11 +0100
committerMagnus Ahltorp <map@kth.se>2014-11-19 04:50:33 +0100
commit31c95a0b8f8776011846d4b8744aa80be68d4830 (patch)
tree0c19438584258610296364ee42108eed42188204 /make.erl
parent9eae8602cefaa53dad6f4c7fca1649668ba9efc5 (diff)
Use an escript to call make, since 'erl -make' doesn't return error code
Diffstat (limited to 'make.erl')
-rwxr-xr-xmake.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/make.erl b/make.erl
new file mode 100755
index 0000000..4ebdf74
--- /dev/null
+++ b/make.erl
@@ -0,0 +1,18 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+
+main(_) ->
+ LagerPath = "../lager/ebin",
+ case code:add_path(LagerPath) of
+ true ->
+ ok;
+ {error, bad_directory} ->
+ io:format("Could not add path ~p~n", [LagerPath]),
+ halt(1)
+ end,
+ case make:all() of
+ up_to_date ->
+ ok;
+ error ->
+ halt(1)
+ end.