From 176179666391830ba50dae4772fe65e765dcbeb9 Mon Sep 17 00:00:00 2001 From: Erik Stenman Date: Mon, 4 Mar 2019 10:56:44 +0100 Subject: [PATCH] Make sure rebar builds sources before trying to build. --- Makefile | 2 ++ rebar.config | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 916426e..785acc4 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,8 @@ REBAR ?= rebar3 all: local +sources: $(GENERATED_SRC) + local: $(GENERATED_SRC) @$(REBAR) as local release diff --git a/rebar.config b/rebar.config index 2b014b7..4684063 100644 --- a/rebar.config +++ b/rebar.config @@ -12,6 +12,11 @@ {escript_main_app, aebytecode}. {escript_name, aefateasm}. {escript_emu_args, "%%!"}. + +{pre_hooks, + [{"(linux|darwin|solaris)", compile, "make sources"}, + {"(freebsd)", compile, "gmake sources"}]}. + {provider_hooks, [{post, [{compile, escriptize}]}]}.