manpagez: man pages & more
info m4
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2 Invoking 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.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on September 29, 2013 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.