One of my dependencies doesn't use rebar
-- it uses a Makefile. How do I get rebar
to run this Makefile, rather than attempting to compile the source itself?
Note that I'd like to continue using rebar for everything else.
Looking at the rebar.config example file, you could mark the dependency as raw
, meaning it's not compiled by rebar. Then you could add either a pre or post compile hook to run make in that dependency directory. The rebar generate
command should still be able to pick up any Erlang apps built there, assuming they have OTP file structure.
If you use
rebar
throughmake
, you can add this kind of code to your Makefile:It checks if
$@
has a Makefile then decides whether to usemake
orrebar
.This snippet is from
erl.mk
https://github.com/fenollp/erl-mk/blob/master/erl.mk#L17-L21