Name

m4

Synopsis

    m4 [options] [files]

General purpose macro processor. On Solaris, m4 is found in /usr/ccs/bin and is the original Unix version. GNU/Linux and Mac OS X use the GNU version of m4. (On Solaris, GNU m4 is in /usr/sfw/bin/gm4.)

URL: http://www.gnu.org/software/m4.

Common Options

-B n

Set push-back and argument collection buffers to n (default is 4096). Ignored by GNU m4.

-Dname[=value], --define=name[=value]

Define name as value or, if value is not specified, define name as null.

-e, --interactive

Operate interactively, ignoring interrupts.

-Hn, --hashsize=n

Set symbol table hash array size to n (default is 199 on Solaris, 509 for GNU m4).

-s, --synclines

Enable line-sync output (#line directives) for the C preprocessor.

-S n

Set call stack size to n (default is 100 slots). Ignored by GNU m4.

-T n

Set token buffer size to n (default is 512 bytes). Ignored by GNU m4.

-Uname, --undefine=name

Undefine name.

GNU m4 Options

-d[flags], --debug[=flags]

Specify flag-level debugging. Default is flags aeq.

-E, --fatal-warnings

Consider all warnings to be fatal, and exit after the first of them.

-Ffile, --freeze-state=file

Record m4’s frozen state in file for later reloading.

-G, --traditional

Behave like traditional m4, ignoring GNU extensions.

-Idirectory, --include=directory

Search directory for include files.

-ln, --arglength=n

Specify the length of debugging output.

-Ln, --nesting-limit=n

Limit the textual nesting of macro calls to n. The default is 250. Useful for some machine-generated input.

-ofile ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.