2013-12-09 31 views

回答

3

看着rebar.config example file,你可以标记依赖关系为raw,这意味着它不是由钢筋编译的。然后你可以添加一个pre或post编译钩子来在该依赖目录中运行make。假设他们具有OTP文件结构,那么rebar generate命令应该仍然能够获取在那里构建的任何Erlang应用程序。

0

如果使用rebar通过make,你可以这样的代码添加到您的Makefile:

@if [[ -f [email protected]/Makefile ]]; \ 
    then echo 'make -C [email protected] all' ; \ 
       make -C [email protected] all ; \ 
    else echo 'cd [email protected] && rebar get-deps compile && cd ../..' ; \ 
       cd [email protected] && rebar get-deps compile && cd ../.. ; fi 

它检查是否有[email protected]一个Makefile然后决定是否使用makerebar

这段代码是从erl.mkhttps://github.com/fenollp/erl-mk/blob/master/erl.mk#L17-L21