From fb1c22169c96b51f331c0e7885cdbd0806585da2 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Mon, 26 Oct 2015 15:55:49 +0000 Subject: Make erl -make return non-zero exit code on failure This makes it behave like similar Unix tools. --- lib/tools/src/make.erl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/tools') diff --git a/lib/tools/src/make.erl b/lib/tools/src/make.erl index c8ef0a04a5..59d02ed648 100644 --- a/lib/tools/src/make.erl +++ b/lib/tools/src/make.erl @@ -24,12 +24,20 @@ %% If Emakefile is missing the current directory is used. -module(make). --export([all/0,all/1,files/1,files/2]). +-export([all_or_nothing/0,all/0,all/1,files/1,files/2]). -include_lib("kernel/include/file.hrl"). -define(MakeOpts,[noexec,load,netload,noload]). +all_or_nothing() -> + case all() of + up_to_date -> + up_to_date; + error -> + halt(1) + end. + all() -> all([]). -- cgit v1.2.3