OS Manuals

/usr/bin/m4

GNU macro processor

From m4 1.4.21-r10 (os), captured 2026-11-05 by running m4 --help (exit 0). permalink

Usage: /usr/bin/m4 [OPTION]... [FILE]...
Process macros in FILEs.  If no FILE or if FILE is `-', standard input
is read.

Mandatory or optional arguments to long options are mandatory or optional
for short options too.

Operation modes:
      --help                   display this help and exit
      --version                output version information and exit
  -E, --fatal-warnings         once: warnings become errors, twice: stop
                                 execution at first error
  -i, --interactive            unbuffer output, ignore interrupts
  -P, --prefix-builtins        force a `m4_' prefix to all builtins
  -Q, --quiet, --silent        suppress some warnings for builtins
      --warn-macro-sequence[=REGEXP]
                               warn if macro definition matches REGEXP,
                                 default \$\({[^}]*}\|[0-9][0-9]+\)

Preprocessor features:
  -D, --define=NAME[=VALUE]    define NAME as having VALUE, or empty
  -I, --include=DIRECTORY      append DIRECTORY to include path
  -s, --synclines              generate `#line NUM "FILE"' lines
  -U, --undefine=NAME          undefine NAME

Limits control:
  -g, --gnu                    override -G to re-enable GNU extensions
  -G, --traditional            suppress all GNU extensions
  -H, --hashsize=PRIME         set symbol lookup hash table size [65537]
  -L, --nesting-limit=NUMBER   change nesting limit, 0 for unlimited [0]

Frozen state files:
  -F, --freeze-state=FILE      produce a frozen state on FILE at end
  -R, --reload-state=FILE      reload a frozen state from FILE at start

Debugging:
  -d, --debug[=FLAGS]          set debug level (no FLAGS implies `aeq')
      --debugfile[=FILE]       redirect debug and trace output to FILE
                                 (default stderr, discard if empty string)
  -l, --arglength=NUM          restrict macro tracing size
  -t, --trace=NAME             trace NAME when it is defined

FLAGS is any of:
  a   show actual arguments
  c   show before collect, after collect and after call
  e   show expansion
  f   say current input file name
  i   show changes in input files
  l   say current input line number
  p   show results of path searches
  q   quote values as necessary, with a or e flag
  t   trace for all macro calls, not only traceon'ed
  x   add a unique macro call id, useful with c flag
  V   shorthand for all of the above flags

If defined, the environment variable `M4PATH' is a colon-separated list
of directories included after any specified by `-I'.

Exit status is 0 for success, 1 for failure, 63 for frozen file version
mismatch, or whatever value was passed to the m4exit macro.

Report bugs to: bug-m4@gnu.org
GNU M4 home page: <https://www.gnu.org/software/m4/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Options (21)
OptionDescriptionSource
--helpdisplay this help and exithelp + man
--versionoutput version information and exithelp + man
-E, --fatal-warningsonce: warnings become errors, twice: stop execution at first errorhelp + man
-i, --interactiveunbuffer output, ignore interruptshelp + man
-P, --prefix-builtinsforce a `m4_' prefix to all builtinshelp + man
-Q, --quiet, --silentsuppress some warnings for builtinshelp + man
--warn-macro-sequence REGEXPwarn if macro definition matches REGEXP, default \$\({[^}]*}\|[0-9][0-9]+\)help
-D, --define NAME[=VALUEdefine NAME as having VALUE, or emptyhelp
-I, --include DIRECTORYappend DIRECTORY to include pathhelp + man
-s, --synclinesgenerate `#line NUM "FILE"' lineshelp + man
-U, --undefine NAMEundefine NAMEhelp + man
-g, --gnuoverride -G to re-enable GNU extensionshelp + man
-G, --traditionalsuppress all GNU extensionshelp + man
-H, --hashsize PRIMEset symbol lookup hash table size [65537]help + man
-L, --nesting-limit NUMBERchange nesting limit, 0 for unlimited [0]help + man
-F, --freeze-state FILEproduce a frozen state on FILE at endhelp + man
-R, --reload-state FILEreload a frozen state from FILE at starthelp + man
-d, --debug FLAGSset debug level (no FLAGS implies `aeq')help
--debugfile FILEredirect debug and trace output to FILE (default stderr, discard if empty string)help
-l, --arglength NUMrestrict macro tracing sizehelp + man
-t, --trace NAMEtrace NAME when it is definedhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.