m4
The format of the m4
command is:
m4
[option...] [macro-definitions...] [input-file...]
All options begin with `-', or if long option names are used, with
a `--'. A long option name need not be written completely, and
unambigous prefix is sufficient. m4
understands the following
options:
--version
m4
without reading any input-files.
--help
m4
without reading any input-files.
-G
--traditional
m4
, for a list of these.
-E
--fatal-warnings
m4
once the first warning has been
issued, considering all of them to be fatal.
-dflags
--debug=flags
-lnum
--arglength=num
-ofile
--error-output=file
-Idir
--include=dir
m4
search dir for included files that are not found in
the current working directory. See section Searching for include files for more details.
-e
--interactive
m4
interactive. This means that all
output will be unbuffered, and interrupts will be ignored.
-s
--synclines
m4
is used as a
front end to a compiler. Source file name and line number information
is conveyed by directives of the form `#line linenum
"filename"', which are inserted as needed into the middle of the
input. Such directives mean that the following line originated or was
expanded from the contents of input file filename at line
linenum. The `"filename"' part is often omitted when
the file name did not change from the previous directive.
Synchronisation directives are always given on complete lines per
themselves. When a synchronisation discrepancy occurs in the middle of
an output line, the associated synchronisation directive is delayed
until the beginning of the next generated line.
-P
--prefix-builtins
-WREGEXP
--word-regexp=REGEXP
m4
implementations.
(see section Changing the lexical structure of words).
-Hn
--hashsize=n
-Ln
--nesting-limit=n
m4
input was generated by mechanical means.
Most users would never need this option. If shown to be obtrusive,
this option (which is still experimental) might well disappear.
This option does not have the ability to break endless
rescanning loops, while these do not necessarily consume much memory
or stack space. Through clever usage of rescanning loops, one can
request complex, time-consuming computations to m4
with useful
results. Putting limitations in this area would break m4
power.
There are many pathological cases: `define(`a', `a')a' is
only the simplest example (but see section Compatibility with other versions of m4
). Expecting GNU
m4
to detect these would be a little like expecting a compiler
system to detect and diagnose endless loops: it is a quite hard
problem in general, if not undecidable!
-Q
--quiet
--silent
-B
-S
-T
m4
, but
do nothing in this implementation.
-Nn
--diversions=n
m4
, and were controlling the number of possible
diversions which could be used at the same time. They do nothing,
because there is no fixed limit anymore.
Macro definitions and deletions can be made on the command line, by using the `-D' and `-U' options. They have the following format:
-Dname
-Dname=value
--define=name
--define=name=value
-Uname
--undefine=name
-tname
--trace=name
-Ffile
--freeze-state file
-Rfile
--reload-state file
The remaining arguments on the command line are taken to be input file names. If no names are present, the standard input is read. A file name of `-' is taken to mean the standard input.
The input files are read in the sequence given. The standard input can only be read once, so the filename `-' should only appear once on the command line.
Go to the first, previous, next, last section, table of contents.