man pages section 1: User Commands

Exit Print View

Updated: July 2014

m4 (1g)


m4 - macro processor


m4 [OPTION]... [FILE]...


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  manda-
     tory or optional for short options too.

  Operation modes:
          display this help and exit

          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  if  macro  definition  matches  REGEXP,   default

  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

GNU M4 1.4.12       Last change: October 2008                   1

User Commands                                               M4(1)

          override -G to re-enable GNU extensions

     -G, --traditional
          suppress all GNU extensions

     -H, --hashsize=PRIME
          set symbol lookup hash table size [509]

     -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

     -d, --debug[=FLAGS]
          set debug level (no FLAGS implies `aeq')

          redirect debug and trace output

     -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

GNU M4 1.4.12       Last change: October 2008                   2

User Commands                                               M4(1)

     V    shorthand for all of the above flags

     If   defined,   the   environment  variable  `M4PATH'  is  a
     colon-separated list of directories included after any spec-
     ified 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 <>.

     Copyright  (C)  2008 Free Software Foundation, Inc.  License
     GPLv3+:     GNU     GPL     version     3      or      later
     This  is  free  software:  you are free to change and redis-
     tribute it.  There is NO WARRANTY, to the  extent  permitted
     by law.

     See   attributes(5)   for   descriptions  of  the  following

     |Availability   | developer/macro/gnu-m4 |
     |Stability      | Committed              |
     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.

     This  software  was   built   from   source   available   at    The  original
     community       source       was       downloaded       from

GNU M4 1.4.12       Last change: October 2008                   3

User Commands                                               M4(1)

     Further  information about this software can be found on the
     open source community  website  at

GNU M4 1.4.12       Last change: October 2008                   4