1M4(1)                            User Commands                           M4(1)
2
3
4

NAME

6       m4 - macro processor
7

SYNOPSIS

9       m4 [OPTION]... [FILE]...
10

DESCRIPTION

12       Process  macros in FILEs.  If no FILE or if FILE is `-', standard input
13       is read.
14
15       Mandatory or optional arguments to long options are  mandatory  or  op‐
16       tional for short options too.
17
18   Operation modes:
19       --help display this help and exit
20
21       --version
22              output version information and exit
23
24       -E, --fatal-warnings
25              once: warnings become errors, twice: stop execution at first er‐
26              ror
27
28       -i, --interactive
29              unbuffer output, ignore interrupts
30
31       -P, --prefix-builtins
32              force a `m4_' prefix to all builtins
33
34       -Q, --quiet, --silent
35              suppress some warnings for builtins
36
37       --warn-macro-sequence[=REGEXP]
38              warn if macro definition matches REGEXP,
39
40              default \$\({[^}]*}\|[0-9][0-9]+\)
41
42       -W, --word-regexp=REGEXP
43              use REGEXP for macro name syntax
44
45   Preprocessor features:
46       -D, --define=NAME[=VALUE]
47              define NAME as having VALUE, or empty
48
49       -I, --include=DIRECTORY
50              append DIRECTORY to include path
51
52       -s, --synclines
53              generate `#line NUM "FILE"' lines
54
55       -U, --undefine=NAME
56              undefine NAME
57
58   Limits control:
59       -g, --gnu
60              override -G to re-enable GNU extensions
61
62       -G, --traditional
63              suppress all GNU extensions
64
65       -H, --hashsize=PRIME
66              set symbol lookup hash table size [509]
67
68       -L, --nesting-limit=NUMBER
69              change nesting limit, 0 for unlimited [0]
70
71   Frozen state files:
72       -F, --freeze-state=FILE
73              produce a frozen state on FILE at end
74
75       -R, --reload-state=FILE
76              reload a frozen state from FILE at start
77
78   Debugging:
79       -d, --debug[=FLAGS]
80              set debug level (no FLAGS implies `aeq')
81
82       --debugfile[=FILE]
83              redirect debug and trace output to FILE (default stderr, discard
84              if empty string)
85
86       -l, --arglength=NUM
87              restrict macro tracing size
88
89       -t, --trace=NAME
90              trace NAME when it is defined
91
92   FLAGS is any of:
93       a      show actual arguments
94
95       c      show before collect, after collect and after call
96
97       e      show expansion
98
99       f      say current input file name
100
101       i      show changes in input files
102
103       l      say current input line number
104
105       p      show results of path searches
106
107       q      quote values as necessary, with a or e flag
108
109       t      trace for all macro calls, not only traceon'ed
110
111       x      add a unique macro call id, useful with c flag
112
113       V      shorthand for all of the above flags
114
115       If defined, the environment variable `M4PATH' is a colon-separated list
116       of directories included after any specified by `-I'.
117
118       Exit status is 0 for success, 1 for failure, 63 for frozen file version
119       mismatch, or whatever value was passed to the m4exit macro.
120

AUTHOR

122       Written by Rene' Seindal.
123

REPORTING BUGS

125       Report bugs to: bug-m4@gnu.org
126       GNU M4 home page: <https://www.gnu.org/software/m4/>
127       General help using GNU software: <https://www.gnu.org/gethelp/>
128
130       Copyright  ©  2021  Free Software Foundation, Inc.  License GPLv3+: GNU
131       GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
132       This is free software: you are free  to  change  and  redistribute  it.
133       There is NO WARRANTY, to the extent permitted by law.
134

SEE ALSO

136       The  full  documentation  for m4 is maintained as a Texinfo manual.  If
137       the info and m4 programs are properly installed at your site, the  com‐
138       mand
139
140              info m4
141
142       should give you access to the complete manual.
143
144
145
146GNU M4 1.4.19                      May 2021                              M4(1)
Impressum