tmac/tmac.an: define .MR in a groff compatible way
groff 1.23.0 added .MR to its -man macro package. The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020." From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.
Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.
Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized. groff's .MR does not. This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
This commit is contained in:
committed by
Dan Cross
parent
00446db7d8
commit
10564b1175
@@ -29,7 +29,7 @@ contains a
|
||||
.I rule
|
||||
for each target that identifies the files and other
|
||||
targets upon which it depends and an
|
||||
.MR sh (1)
|
||||
.MR sh 1
|
||||
script, a
|
||||
.IR recipe ,
|
||||
to update the target.
|
||||
@@ -157,7 +157,7 @@ In the recipe of a meta-rule, the environment variable
|
||||
contains the string matched by the
|
||||
.BR % .
|
||||
For example, a meta-rule to compile a C program using
|
||||
.MR 9c (1)
|
||||
.MR 9c 1
|
||||
might be:
|
||||
.IP
|
||||
.EX
|
||||
@@ -207,7 +207,7 @@ References to variables are replaced by the variables' values.
|
||||
Special characters may be quoted using single quotes
|
||||
.BR \&''
|
||||
as in
|
||||
.MR sh (1) .
|
||||
.MR sh 1 .
|
||||
.PP
|
||||
Assignments and rules are distinguished by
|
||||
the first unquoted occurrence of
|
||||
@@ -246,7 +246,7 @@ A legal reference of the form
|
||||
or
|
||||
.B ${name}
|
||||
is expanded as in
|
||||
.MR sh (1) .
|
||||
.MR sh 1 .
|
||||
A reference of the form
|
||||
.BI ${name: A % B = C\fL%\fID\fL}\fR,
|
||||
where
|
||||
@@ -315,9 +315,9 @@ or
|
||||
.BR rcsh ,
|
||||
.I mk
|
||||
uses
|
||||
.MR rc (1) 's
|
||||
.MR rc 1 's
|
||||
quoting rules; otherwise it uses
|
||||
.MR sh (1) 's.
|
||||
.MR sh 1 's.
|
||||
The
|
||||
.B MKSHELL
|
||||
variable is consulted when the mkfile is read, not when it is executed,
|
||||
@@ -523,7 +523,7 @@ of the aggregate
|
||||
Currently, the only aggregates supported are
|
||||
.I 9ar
|
||||
(see
|
||||
.MR 9c (1) )
|
||||
.MR 9c 1 )
|
||||
archives.
|
||||
.SS Attributes
|
||||
The colon separating the target from the prerequisites
|
||||
@@ -567,12 +567,12 @@ In the rule,
|
||||
.B %
|
||||
has no special meaning.
|
||||
The target is interpreted as a regular expression as defined in
|
||||
.MR regexp (7) .
|
||||
.MR regexp 7 .
|
||||
The prerequisites may contain references
|
||||
to subexpressions in form
|
||||
.BI \e n\f1,
|
||||
as in the substitute command of
|
||||
.MR sed (1) .
|
||||
.MR sed 1 .
|
||||
.TP
|
||||
.B U
|
||||
The targets are considered to have been updated
|
||||
@@ -625,7 +625,7 @@ Regular expression meta-rules:
|
||||
.EE
|
||||
.PP
|
||||
A correct way to deal with
|
||||
.MR yacc (1)
|
||||
.MR yacc 1
|
||||
grammars.
|
||||
The file
|
||||
.B lex.c
|
||||
@@ -656,8 +656,8 @@ x.tab.h:Pcmp -s: y.tab.h
|
||||
.SH SOURCE
|
||||
.B \*9/src/cmd/mk
|
||||
.SH SEE ALSO
|
||||
.MR sh (1) ,
|
||||
.MR regexp (7)
|
||||
.MR sh 1 ,
|
||||
.MR regexp 7
|
||||
.PP
|
||||
A. Hume,
|
||||
``Mk: a Successor to Make''
|
||||
|
||||
Reference in New Issue
Block a user