Next: Syntax, Previous: Preliminaries, Up: Top [Contents][Index]
m4
The format of the m4
command is:
m4
[option…] [file…]
All options begin with ‘-’, or if long option names are used, with
‘--’. A long option name need not be written completely, any
unambiguous prefix is sufficient. POSIX requires m4
to
recognize arguments intermixed with files, even when
POSIXLY_CORRECT
is set in the environment. Most options take
effect at startup regardless of their position, but some are documented
below as taking effect after any files that occurred earlier in the
command line. The argument -- is a marker to denote the end of
options.
With short options, options that do not take arguments may be combined into a single command line argument with subsequent options, options with mandatory arguments may be provided either as a single command line argument or as two arguments, and options with optional arguments must be provided as a single argument. In other words, m4 -QPDfoo -d a -df is equivalent to m4 -Q -P -D foo -d -df -- ./a, although the latter form is considered canonical.
With long options, options with mandatory arguments may be provided with
an equal sign (‘=’) in a single argument, or as two arguments, and
options with optional arguments must be provided as a single argument.
In other words, m4 --def foo --debug a is equivalent to
m4 --define=foo --debug= -- ./a, although the latter form is
considered canonical (not to mention more robust, in case a future
version of m4
introduces an option named --default).
m4
understands the following options, grouped by functionality.
• Operation modes | Command line options for operation modes | |
• Preprocessor features | Command line options for preprocessor features | |
• Limits control | Command line options for limits control | |
• Frozen state | Command line options for frozen state | |
• Debugging options | Command line options for debugging | |
• Command line files | Specifying input files on the command line |
Next: Syntax, Previous: Preliminaries, Up: Top [Contents][Index]