1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<TITLE>GNU m4 - What is GNU m4</TITLE>
<META NAME="AUTHOR" CONTENT="René Seindal">
<META NAME="GENERATOR" CONTENT="GNU m4 1.4l">
</HEAD>
<BODY text="#000000" bgcolor="#FFCC99" link="#0000EF" alink="#FF0000" vlink="#51188E">
<TABLE cellpadding=5 width="100%">
<TR align=left valign=bottom>
<TD align=center valign=center colspan="3" width="100%" bgcolor="#FF9900">
<H1>GNU m4</H1>
<H2>What is GNU m4</H2>
</TD>
</TR>
<TR >
<TD align=left valign=top width="15%" bgcolor="#FF9900">
<TABLE align=left valign=top columns=1>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Generel info</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="whatis.htm">What is m4</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="features.htm">Features</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="uses.htm">Uses of m4</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Documentation</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="man/m4_toc.html">Manual</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Source files</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="readme.htm">README</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="todo.htm">TODO</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="news.htm">NEWS</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="changelog.htm">ChangeLog</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="thanks.htm">Contributors</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="m4/">Browse it</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>The Future</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="modules.htm">Modules</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="visions.htm">Visions</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Development</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="lists.htm">Mailing-lists</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="feedback.htm">Feedback</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="download.htm">Download</A></B>
</P>
</FONT>
</TD>
</TR>
<TR>
<TD bgcolor="#CC6600">
<P>
<B>Examples</B>
</P>
</TD>
</TR>
<TR>
<TD>
<FONT size=-1><P>
<B><A HREF="thissite.htm">This site</A></B>
</P>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD align=left valign=top width="90%">
<P>
GNU <TT>m4</TT> is an implementation of the traditional Unix macro
processor. It is mostly SVR4 compatible, although it has some extensions
(for example, handling more than 9 positional parameters to macros). GNU
<TT>m4</TT> also has built-in functions for including files, running shell
commands, doing arithmetic, etc.
</P>
<P>
GNU <TT>m4</TT> is a macro processor, in the sense that it copies its
input to the output, expanding macros as it goes. Macros are either
builtin or user-defined, and can take any number of arguments. Besides
just doing macro expansion, m4 has builtin functions for including named
files, running UNIX commands, doing integer arithmetic, manipulating
text in various ways, recursion, etc... m4 can be used either as a
front-end to a compiler, or as a macro processor in its own right.
</P>
<P>
The m4 macro processor is widely available on all UNIXes. Usually,
only a small percentage of users are aware of its existence. However,
those who do often become commited users. The growing popularity of GNU
Autoconf, which prerequires GNU m4 for generating the `configure'
scripts, is an incentive for many to install it, while these people will
not themselves program in m4. GNU m4 is mostly compatible with the
System V, Release 3 version, except for some minor differences.
</P>
<P>
Some people found m4 to be fairly addictive. They first use m4 for
simple problems, then take bigger and bigger challenges, learning how to
write complex m4 sets of macros along the way. Once really addicted,
users pursue writing of sophisticated m4 applications even to solve
simple problems, devoting more time debugging their m4 scripts than
doing real work. Beware that m4 may be dangerous for the health of
compulsive programmers.
</P>
<P>
Autoconf needs GNU m4 for generating `configure' scripts, but not for
running them.
</P>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
|