Creating a directives.mf file

directives.mf is a text file written in the style of .editorconfig, which is based on the .ini style. You can create and edit a directives.mf file using any text editor. The following list describes each component of directives.mf:

Comment: #
Place # at the start of a line to indicate a comment. Comments may wrap.
Attribute: @
Place @ at the start of a line to define a file attribute. For example, use @root to set the file as your root directives.mf.
GLOB pattern: [...]
Marks a block of directives that apply to source files matching the GLOB pattern. The GLOB pattern must include one or more file extensions. For example:
[*.{cbl,cob,CBL}]

or

[builtin.cbl]

The file extension specification(s) indicate the type of code and therefore which compiler to use.

Important: GLOB patterns are case sensitive.
Directive block
A list of directives to apply to compilation of sources that match the GLOB pattern, one directive per line. For example:
DIALECT(MF)
SOURCEFORMAT(VARIABLE)
SQL(BEHAVIOR=OPTIMIZED)
Variable: ${var-name}
Where var-name is a built-in variable for inserting platform-specific tokens, relative paths, and environment variables. The following are built-in variables:
Variable UNIX Windows
${root.dir} /app/ C:\app\
${directives.dir} /app/src/ C:\app\src\
${source.path} /app/src/init.cbl C:\app\src\init.cbl
${source.dir} app/src/ C:\app\src\
${source.basename} init.cbl init.cbl
${source.name} init init
${source.ext} .cbl .cbl
${env.TERM} xterm xterm
${os.ds} / \
${os.ps} : ;