version 1.9, 1996/11/30 21:08:59 |
version 1.10, 1997/04/01 07:28:15 |
|
|
.\" $OpenBSD$ |
.\" $OpenBSD$ |
.\" $NetBSD: make.1,v 1.16 1996/11/06 17:59:13 christos Exp $ |
.\" $NetBSD: make.1,v 1.18 1997/03/10 21:19:53 christos Exp $ |
.\" |
.\" |
.\" Copyright (c) 1990, 1993 |
.\" Copyright (c) 1990, 1993 |
.\" The Regents of the University of California. All rights reserved. |
.\" The Regents of the University of California. All rights reserved. |
|
|
.Ql Cm M , |
.Ql Cm M , |
but selects all words which do not match |
but selects all words which do not match |
the rest of the modifier. |
the rest of the modifier. |
|
.It Cm Q |
|
Quotes every shell meta-character in the variable, so that it can be passed |
|
safely through recursive invocations of |
|
.Nm . |
.It Cm R |
.It Cm R |
Replaces each word in the variable with everything but its suffix. |
Replaces each word in the variable with everything but its suffix. |
.Sm off |
.Sm off |
.It Cm S No \&/ Ar old_pattern Xo |
.It Cm S No \&/ Ar old_string Xo |
.No \&/ Ar new_pattern |
.No \&/ Ar new_string |
.No \&/ Op Cm g |
.No \&/ Op Cm 1g |
.Xc |
.Xc |
.Sm on |
.Sm on |
Modify the first occurrence of |
Modify the first occurrence of |
.Ar old_pattern |
.Ar old_string |
in each word to be replaced with |
in the variable's value, replacing it with |
.Ar new_pattern . |
.Ar new_string . |
If a |
If a |
.Ql g |
.Ql g |
is appended to the last slash of the pattern, all occurrences |
is appended to the last slash of the pattern, all occurrences |
in each word are replaced. |
in each word are replaced. |
|
If a |
|
.Ql 1 |
|
is appended to the last slash of the pattern, only the first word |
|
is affected. |
If |
If |
.Ar old_pattern |
.Ar old_string |
begins with a carat |
begins with a caret |
.Pq Ql ^ , |
.Pq Ql ^ , |
.Ar old_pattern |
.Ar old_string |
is anchored at the beginning of each word. |
is anchored at the beginning of each word. |
If |
If |
.Ar old_pattern |
.Ar old_string |
ends with a dollar sign |
ends with a dollar sign |
.Pq Ql \&$ , |
.Pq Ql \&$ , |
it is anchored at the end of each word. |
it is anchored at the end of each word. |
|
|
an ampersand |
an ampersand |
.Pq Ql & |
.Pq Ql & |
is replaced by |
is replaced by |
.Ar old_pattern . |
.Ar old_string |
|
(without any |
|
.Ql ^ |
|
or |
|
.Ql \&$ ) . |
Any character may be used as a delimiter for the parts of the modifier |
Any character may be used as a delimiter for the parts of the modifier |
string. |
string. |
The anchoring, ampersand and delimiter characters may be escaped with a |
The anchoring, ampersand and delimiter characters may be escaped with a |
|
|
.Ar new_string |
.Ar new_string |
with the single exception that a backslash is used to prevent the expansion |
with the single exception that a backslash is used to prevent the expansion |
of a dollar sign |
of a dollar sign |
.Pq Ql \&$ |
.Pq Ql \&$ , |
not a preceding dollar sign as is usual. |
not a preceding dollar sign as is usual. |
|
.Sm off |
|
.It Cm C No \&/ Ar pattern Xo |
|
.No \&/ Ar replacement |
|
.No \&/ Op Cm 1g |
|
.Xc |
|
.Sm on |
|
The |
|
.Cm C |
|
modifier is just like the |
|
.Cm S |
|
modifier except that the the old and new strings, instead of being |
|
simple strings, are a regular expression (see |
|
.Xr regex 3 ) |
|
and an |
|
.Xr ed 1 Ns \-style |
|
replacement string. Normally, the first occurrence of the pattern in |
|
each word of the value is changed. The |
|
.Ql 1 |
|
modifier causes the substitution to apply to at most one word; the |
|
.Ql g |
|
modifier causes the substitution to apply to as many instances of the |
|
search pattern as occur in the word or words it is found in. Note that |
|
.Ql 1 |
|
and |
|
.Ql g |
|
are orthogonal; the former specifies whether multiple words are |
|
potentially affected, the latter whether multiple substitutions can |
|
potentially occur within each affected word. |
.It Cm T |
.It Cm T |
Replaces each word in the variable with its last component. |
Replaces each word in the variable with its last component. |
.It Ar old_string=new_string |
.It Ar old_string=new_string |
|
|
Ignore any errors from the commands associated with this target, exactly |
Ignore any errors from the commands associated with this target, exactly |
as if they all were preceded by a dash |
as if they all were preceded by a dash |
.Pq Ql \- . |
.Pq Ql \- . |
|
.It Ic .MADE |
|
Mark all sources of this target as being up-to-date. |
.It Ic .MAKE |
.It Ic .MAKE |
Execute the commands associated with this target even if the |
Execute the commands associated with this target even if the |
.Fl n |
.Fl n |