M4(1) User Commands M4(1)

M4 - macro processor

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.

display this help and exit
output version information and exit
stop execution after first warning
-e, --interactive
unbuffer output, ignore interrupts
force a `m4_' prefix to all builtins
suppress some warnings for builtins

define NAME has having VALUE, or empty
append DIRECTORY to include path
generate `#line NUM "FILE"' lines
undefine NAME

suppress all GNU extensions
set symbol lookup hash table size [509]
change artificial nesting limit [1024]

produce a frozen state on FILE at end
reload a frozen state from FILE at start

set debug level (no FLAGS implies `aeq')
-l, --arglength=NUM
restrict macro tracing size
redirect debug and trace output
-t, --trace=NAME
trace NAME when it will be defined

show actual arguments
show before collect, after collect and after call
show expansion
say current input file name
show changes in input files
say current input line number
show results of path searches
quote values as necessary, with a or e flag
trace for all macro calls, not only traceon'ed
add a unique macro call id, useful with c flag
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.

Written by Rene' Seindal.

Report bugs to <bug-m4@gnu.org>.

Copyright © 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The full documentation for M4 is maintained as a Texinfo manual. If the info and M4 programs are properly installed at your site, the command

info m4

should give you access to the complete manual.

August 2006 FSF