HaXe M4 Extension
From dis-Emi-A
Much of the library makes use of the M4 preprocessor, which is not part of the standard haxe. Files using the M4 extensions are suffixed with .mhx, they are then processed by M4 to produce the .hx file which is in turn used by the haXe compiler.
NOTE: For users of the binary distribution, you need to be aware that both the .hx and .mhx files are present. For reading the source it is better to focus on the .mhx version when present.
Standard Macros
Beyond simple enabling the M4 macros there is a standard set of included files used by any M4-haXe source file. These files, presently, are:
- heredoc.m4
- Provides a syntax for including arbitrary strings and textual files as haXe string constants.
- assert.ihx
- Provides extended assertion support with C-like macros
Additionally these macros are defined:
- HXROOT
- the root directory of the library
- FILEDIR
- the directory of the current file
Include Directories
For M4-haXe files the following are part of the include path for M4:
- the m4 directory in the library, for access to pure m4 includes
- the lib directory in the library, for access to ihx includes
- the directory of the current file
