Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2002 05:30:05 -0700 (PDT)
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        freebsd-doc@FreeBSD.org
Subject:   Re: docs/26943: [patch] description of :C modifier is misplaced in make.1
Message-ID:  <200205131230.g4DCU5n10807@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/26943; it has been noted by GNATS.

From: Giorgos Keramidas <keramida@freebsd.org>
To: Peter Pentchev <roam@ringlet.net>
Cc: bug-followup@freebsd.org
Subject: Re: docs/26943: [patch] description of :C modifier is misplaced in make.1
Date: Mon, 13 May 2002 15:25:50 +0300

 On 2002-05-13 13:49, Peter Pentchev wrote:
 > Moving the documentation to the description of :C looks like a good
 > thing to me.
 
 Silly me, I meant to include the new :C entry I made until now, and I
 forgot the patch.  Here it is.  I have moved most of the stuff from
 the description of :S to this paragraph.  If I've forgotten anything
 please let me know.
 
 %%%
 Index: make.1
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/make/make.1,v
 retrieving revision 1.54
 diff -u -1 -0 -r1.54 make.1
 --- make.1	20 Apr 2002 12:15:44 -0000	1.54
 +++ make.1	13 May 2002 12:17:04 -0000
 @@ -589,45 +589,57 @@
  special characters.
  The colon may be escaped with a backslash
  .Pq Ql \e .
  .Bl -tag -width Cm
  .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 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.
 +Modify each word of the value, substituting
 +.Ar pattern
 +with
 +.Ar replacement .
 +In
 +.Ar pattern
 +regular expressions can be used (see
 +.Xr regex 3
 +or
 +.Xr ed 1
 +for more information on regular expressions).
  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.
 +Inside
 +.Ar replacement ,
 +an ampersand
 +.Pq Ql &
 +is replaced by the text that matched
 +.Ar pattern .
 +Any character may be used as a delimiter for the parts of the modifier
 +string.
 +The ampersand and delimiter characters may be escaped with a
 +backslash
 +.Pq Ql \e .
  .It Cm E
  Replaces each word in the variable with its suffix.
  .It Cm H
  Replaces each word in the variable with everything but the last component.
  .It Cm L
  Converts variable to lower-case letters.
  .It Cm M Ns Ar pattern
  Select only those words that match the rest of the modifier.
  The standard shell wildcard characters
  .Pf ( Ql * ,
 %%%
 
 -- 
 Giorgos Keramidas    - http://www.FreeBSD.org
 keramida@FreeBSD.org - The Power to Serve

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205131230.g4DCU5n10807>