1 Star 2 Fork 1

zyuyou / mmake

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

#usage

  • this file based on otp_src/lib/tools/src/make.erl, support the multiple processes compile.
  • the exported functions are like make.erl, except for add the Worker Number as the first argument for every functions.

e.g. mmake:all(5), means you compile the codes defined in Emakefile by 5 workers.

in your Makefile or script :

erl -eval "case make:files([\"mmake.erl\"], [{outdir, \"ebin\"}]) of error -> halt(1); _ -> ok end" 
    -eval "case mmake:all(8,[$(MAKE_OPTS)]) of up_to_date -> halt(0); error -> halt(1) end."

使用

  • 这个编译文件基于 otp_src/lib/tools/src/make.erl, 支持多进程编译。
  • 模块的导出函数跟make.erl文件类似, 增加了Worker Number 作为每个函数的第一个参数。

举例:mmake:all(5), 指通过5个workers进程来编译你来的代码。

在你的Makefile、script或者.bat(windows下的批处理文件)中加入下述代码:

erl -eval "case make:files([\"mmake.erl\"], [{outdir, \"ebin\"}]) of error -> halt(1); _ -> ok end" 
    -eval "case mmake:all(8,[$(MAKE_OPTS)]) of up_to_date -> halt(0); error -> halt(1) end."

注意:通常mmake.erl的存放路径为: "deps/mmake/mmake.erl"

空文件

简介

emakefile的并行编译 展开 收起
Erlang
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Erlang
1
https://gitee.com/zyuyou/mmake.git
git@gitee.com:zyuyou/mmake.git
zyuyou
mmake
mmake
master

搜索帮助

14c37bed 8189591 565d56ea 8189591