简体   繁体   English

OCamlbuild递归构建依赖关系

[英]OCamlbuild recursively build dependecies

I'm building a project that uses OCamlbuild as its build system. 我正在建立一个使用OCamlbuild作为其构建系统的项目。 This project also requires a library, which also uses OCamlbuild. 该项目还需要一个库,该库也使用OCamlbuild。 This library comes with .mlpack , _tags , and myocamlbuild.ml files. 该库带有.mlpack_tagsmyocamlbuild.ml文件。 I have included the library into my project as a git submodule in the path lib/mylib starting from the project's root. 我已经将该库作为git子模块包含在我的项目中,从该项目的根开始在路径lib/mylib

I'd like to tell OCamlbuild to recursively compile the library, as I would to with a make -C lib/mylib in a Makefile . 我想告诉OCamlbuild递归编译该库,就像在Makefile使用make -C lib/mylib

How can I achieve that? 我该如何实现?

Thanks. 谢谢。

An answer is described in Working on dependent projects with OCamlbuild . 使用OCamlbuild处理依赖项目中描述了一个答案。
Basically, add <lib/mylib>: include to _tags and import the library myocamlbuild.ml . 基本上,将<lib/mylib>: include_tags并导入库myocamlbuild.ml It does seem a bit wobbly. 看起来确实有点不稳定。

Or use Dune . 或使用Dune

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM