[Erlang危机](2.0)创建erlang开源程序



原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface



创建一个开源的Erlang软件(software)



Most Erlang books tend to explain how to build Erlang/OTP applications, but few of them go very much in depth about how to integrate with the Erlang community doing Open Source work.
Some of them even avoid the topic on purpose. This chapter dedicates itself to doing a quick tour of the state of affairs in Erlang.

  大多数Erlang书籍都倾向于介绍怎样去创建Erlang/OTP applications,但鲜有书本深入去介绍如何与Erlang社区一起,做一些开源的工作,本章节会示范如何快速完成这些工作。


 

OTP applications are the vast majority of the open source code people will encounter.
In fact, many people who would need to build an OTP release would do so as one umbrella OTP application.

  OTP applications是人们在绝大部分的开源代码中都会遇到的。 事实上,很多人创建的OTP release都像一个伞形结构的OTP application。 



If what you’re writing is a stand-alone piece of code that could be used by someone building a product, it’s likely an OTP application. If what you’re building is a product that stands on its own and should be deployed by users as-is (or with a little configuration), what you should be building is an OTP release. 1

  如果你正在写一个独立代码库(供给别人创建产品或者产品组成的某部分),最好是写成OTP application。 如果你创建的代码是直接提供给用户部署的,你应该创建的是一个OTP release。 



The main build tools supported are rebar and erlang.mk. The former is a portable Erlang script that will be used to wrap around a lot of standard functionality and add its own, while the latter is a very fancy makefile that does a bit less, but tends to be faster when it comes to compiling.
In this chapter, I’ll mostly focus on using rebar to build things, given it’s the ad-hoc standard, is well-established, and erlang.mk applications tend to also be supported by rebar as dependencies.

  主要的构建工具是Rebar 和erlang.mk。 Rebar是一个附带许多标准功能的轻量级Erlang脚本;erlang.mk则是一个很小却能非常快编译文件的神奇makefile 文件。
在本章节中,我大部分会集中使用rebar来创建符合标准的文件,rebar也支持erlank.mk 的application。 


 

[1]The details of how to build an OTP application or release is left up to the Erlang introduction book you have at hand.

[注1]:关于如何创建一个OTP application 或OTP release,你可以查阅其它介绍Erlang的书籍(Sunface - 可以参考Erlang/OTP这本书)。




  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值