version 1.22, 2001/09/27 11:40:33 |
version 1.23, 2001/09/29 11:56:18 |
|
|
.Nd macro language processor |
.Nd macro language processor |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm m4 |
.Nm m4 |
|
.Op Fl d Ar flags |
|
.Op Fl t Ar name |
.Op Fl g |
.Op Fl g |
.Oo |
.Oo |
.Fl D Ns Ar name Ns Op Ar =value |
.Fl D Ns Ar name Ns Op Ar =value |
|
|
Add directory |
Add directory |
.Ar dirname |
.Ar dirname |
to the include path. |
to the include path. |
|
.It Fl d Ar "flags" |
|
Set trace flags. |
|
.Ar flags |
|
may hold the following: |
|
.Bl -tag -width Ds |
|
.It Ar a |
|
print macro arguments. |
|
.It Ar c |
|
print macro expansion over several lines. |
|
.It Ar e |
|
print result of macro expansion. |
|
.It Ar f |
|
print filename location. |
|
.It Ar l |
|
print line number. |
|
.It Ar q |
|
quote arguments and expansion with the current quotes. |
|
.It Ar t |
|
start with all macros traced. |
|
.It Ar x |
|
number macro expansions. |
|
.It Ar V |
|
turn on all options. |
|
.El |
|
.Pp |
|
By default, trace is set to |
|
.Qq eq . |
|
.It Fl t Ar macro |
|
Turn tracing on for |
|
.Ar macro . |
.It Fl g |
.It Fl g |
Activate GNU-m4 compatibility mode. |
Activate GNU-m4 compatibility mode. |
In this mode, changequote with |
In this mode, changequote with |
|
|
.It Ic __file__ |
.It Ic __file__ |
Returns the current file's name. |
Returns the current file's name. |
.El |
.El |
|
.Sh COMPATIBILITY |
|
.Nm |
|
follows the Single Unix 2 specification, along with a few extensions taken |
|
from |
|
.Nm gnu-m4 . |
|
.Pp |
|
The |
|
.Fl s |
|
option |
|
.Po |
|
.Xr cpp 1 's |
|
#line directives |
|
.Pc |
|
is currently not supported. |
|
Flags |
|
.Fl I , |
|
.Fl d , |
|
.Fl t |
|
are non-standard. |
|
.Pp |
|
The output format of tracing and of |
|
.Ic dumpdef |
|
are not specified in any standard, |
|
are likely to change and should not be relied upon. |
|
The current format of tracing is closely modelled on |
|
.Nm gnu-m4 , |
|
to allow |
|
.Nm autoconf |
|
to work. |
|
.Pp |
|
For portability, one should not use the macros |
|
.Ic builtin , |
|
.Ic esycmd , |
|
.Ic expr , |
|
.Ic indir , |
|
.Ic paste , |
|
.Ic patsubst , |
|
.Ic regexp , |
|
.Ic spaste , |
|
.Ic unix , |
|
.Ic __line__ , |
|
.Ic __file__ . |
|
.Pp |
|
All builtins do expand without arguments in many other |
|
.Nm m4 . |
|
.Pp |
|
Many other |
|
.Nm |
|
have dire size limitations with respect to buffer sizes. |
.Sh AUTHORS |
.Sh AUTHORS |
Ozan Yigit <oz@sis.yorku.ca> and Richard A. O'Keefe (ok@goanna.cs.rmit.OZ.AU). |
Ozan Yigit <oz@sis.yorku.ca> and Richard A. O'Keefe (ok@goanna.cs.rmit.OZ.AU). |
GNU-m4 compatibility extensions by Marc Espie <espie@cvs.openbsd.org>. |
GNU-m4 compatibility extensions by Marc Espie <espie@cvs.openbsd.org>. |