I see an issue here, if REBAR points to ./rebar and the dep doesn't have rebar itself, it will break. Better is to define REBAR with an absolute path, that way the dep doesn't have to have rebar itself.