Title: Theory / Unimportant / CS / Programming / oCaml / ocamlbuild
Tags: computer_to_instruction FromInstruction hasNotNewEffectReturnsMeaning fromCommandLine FromVariables comment examplesSwitchExample1 hasSeenConjDef
On every note of this deck, unless a note says otherwise:
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference

Name: Dynamic dependencies
Definition: dependencies that are only determined during the build of the target
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Context: ocamlbuild
Example: the local modules on which a source file depends, and are not explicitly listed in a configuration file

Name: rules
Definition: how to build certain kinds of files, named targets,
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Context: ocamlbuild
Definition2: from some dependencies (statically known or dynamically discovered)
Conjdef: OCaml code that specifies on a high level

Name: tag
Definition: an abstraction layer designed to specify command-line flags in a declarative style
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Context: ocamlbuild

Variable: _tags
Meaning: the set of tags to applies to ocamlbuilds
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Language: ocamlbuild
Typ: file

Instruction: foo:bar
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: on files satisfying conditions foo apply tags bar
Language: ocamlbuild

Instruction: true
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: filter which match anything
Language: ocamlbuild
Context: conditions

Fla: --no-hygiene
Effect: do not check whether there are compiled file in the source directory
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Prefix: ocamlbuild

Instruction: not-hygienic precious
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: State that ocamlbuild should accept those file in source directory
Language: ocamlbuild
Context: tag

Instruction: package(foo)
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: this file depends of package foo
Language: ocamlbuild
Context: tag

Fla: -use-ocamlfind
Effect: tell OCamlbuild to enable support for ocamlfind
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Prefix: ocamlbuild

Instruction: syntax(foo)
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: use preprocessor foo
Language: ocamlbuild
Context: tag

Fla: -syntax foo
Effect: use preprocessor foo
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Prefix: ocamlbuild

Name: root directory
Definition: Directory in which ocamlbuild is invoked
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Context: ocamlbuild

Variable: -build-dir
Meaning: set the build directory
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Language: ocamlbuild
Typ: flag

Instruction: traverse
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Effect: consider the directory and its subdirectory
Language: ocamlbuild
Context: tags

Fla: -r
Effect: consider all subdirectories, except for the version control, opam and _build directory
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Prefix: ocamlbuild

Fla: -I foo
Effect: include directory foo in the include path
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc
Prefix: ocamlbuild

Extension: cmx
Description: OCaml native-compiled object file, providing the implementation of the module with same prefix

Extension: cmxa
Description: OCaml native-compiled archive file, containing a collection of .cmx files, for static linking only.

Extension: lib
Description: Complementary native library files for a native-compiled archive file foo.cmxa, containing a collection of .o or .obj files.

Extension: cmxs
Description: OCaml native-compiled archive file (or "plugin") for dynamic linking, containing a collection of .cmx, .cmxa, .o|.obj, .a|.lib files.

Extension: mlp ml4 mlip mli4
Description: Common extensions for ocaml files to be processed by an external preprocessor

Question: To build a .cmx, ocamlbuild use
Answer: from the corresponding source files (.ml, and the .mli if it exists).
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: ocaml

Question: To build a .cmo, ocamlbuild use
Answer: from the corresponding source files (.ml, and the .mli if it exists).
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: ocaml

Question: To build a .byte, ocamlbuild use
Answer: a module and its dependencies for bytecode and native compilation.
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: ocaml

Question: To build a .native, ocamlbuild use
Answer: a module and its dependencies for bytecode and native compilation.
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: ocaml

Extension: mllib
Description: Contains a list of module paths (Bar, subdir/Baz) that will be compiled and archived together to build a corresponding .cma or .cmxa target.

Extension: mldylib
Description: Contains a list of module paths (Bar, subdir/Baz) that will be compiled and archived together to build a corresponding .cmxs target (native plugin). There is no corresponding concept of bytecode plugin archive, as .cma files (built from .mllib files) support for static and dynamic linking.

Extension: itarget
Means: input list of ocamlbuild targets

Extension: otarget
Means: output list of targets

Extension: odocl
Description: Contains a list of module names for which to produce documentation, using one of the targets listed below.

Extension: mlypack
Description: a list of mly filed, used together to create a parser
Means: a package of mly

Extension: ml(i).depends
Description: a conservative over-approximation of the external dependencies of the corresponding source file, compiled by ocamlbuild

Extension: inferred.mli
Description: Infer a .mli interface from the corresponding .ml file.

Extension: other extension
Description: todo

Instruction: use_menhir
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: use menhir for parsers
Language: ocamlbuild
Context: _tags

Fla: -use-menhir
Effect: use menhir for parsers
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Prefix: ocamlbuild

Language: ocamlbuild
Instruction: #foo
Other fields (not shown on cards):
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: _tags

Fla: -documentation
Effect: a list of rules and tags known to OCamlbuild in the current project
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Prefix: ocamlbuild

Instruction: parametrized tags
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: What is this ?
Language: ocamlbuild
Context: _tags

Name: glob expression
Definition: an expression built of basic logic connective on top of "glob patterns"
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Context: ocamlbuild _tags

Instruction: <foo>
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: Paths matching the pattern foo
Language: ocamlbuild
Context: _tags glob expression

Instruction: "foo"
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: the exact string foo
Language: ocamlbuild
Context: _tags glob expression

Instruction: e_1 or e_2
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: paths matching one of the e_i
Language: ocamlbuild
Context: _tags glob expression

Instruction: e_1 and e_2
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: paths matching e_1 and e_2
Language: ocamlbuild
Context: _tags glob expression

Instruction: not e
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: Paths not matching the expression e
Language: ocamlbuild
Context: _tags glob expression

Instruction: true
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: all pathnames
Language: ocamlbuild
Context: _tags glob expression

Instruction: false
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: no pathname
Language: ocamlbuild
Context: _tags glob expression

Instruction: **/
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: The empty string, or any string ending with a slash /.
Language: ocamlbuild
Context: _tags glob pattern

Instruction: /**/
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: Any string starting and ending with a slash /
Language: ocamlbuild
Context: _tags glob pattern

Instruction: /**
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: The empty string, or any string starting with a slash /.
Language: ocamlbuild
Context: _tags glob pattern

Instruction: {foo_1, ..., foo_n}
Page: https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc#Sec_Reference
Effect: Any string matching one of the given patterns.
Language: ocamlbuild
Context: _tags glob pattern