The _tags file _tags in addition to myocamlbuild.ml forms the root of the ocamlbuild compilation ocamlbuild .
ocamlbuild is a very general tool that can compile anything. It is controlled by a solver, which, according to the task set by the user, finds a solution that can satisfy the goal. A solution is a chain of rules applied to files. Files can be tagged. Tags can change the rules. For example, it can add flags, such as enabling profiling or binding to a library.
A _tags file provides a mechanism for assigning tags to files and has a simple grammar:
pattern ":" tag "," {tag}.
What is to the left of : is actually a pattern or regular expression. Each file corresponding to the expression is assigned all the tags that are to the right of :
<**/*> means that for all files in this folder and for all subfolders there is a shortcut for this: true . <*> means for all files in this folder (without going to subfolders). Other examples: <*.ml> , <*.cmx> or <**/*.cma> (btw or can also be used to build a template).
OCamlbuild is documented in the OCaml Handbook , there is also a dump of the old wiki, with a lot of information.
But the fun part is that usually you don't need to know this to use OCaml. There is an OASIS tool that will automate all tasks and create a _tags file for you from a simple and high-level definition.
source share