From owner-svn-src-head@FreeBSD.ORG Wed May 30 22:23:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A36C10656E1; Wed, 30 May 2012 22:23:09 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFCD8FC0C; Wed, 30 May 2012 22:23:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UMN9Ve083683; Wed, 30 May 2012 22:23:09 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4UMN95p083678; Wed, 30 May 2012 22:23:09 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201205302223.q4UMN95p083678@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 30 May 2012 22:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236338 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 May 2012 22:23:09 -0000 Author: obrien Date: Wed May 30 22:23:08 2012 New Revision: 236338 URL: http://svn.freebsd.org/changeset/base/236338 Log: Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower case) modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into NetBSD's make, which is the source for the Portable Berkeley Make. Submitted by: Simon Gerraty Modified: head/usr.bin/make/Makefile head/usr.bin/make/make.1 head/usr.bin/make/var.c Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/Makefile Wed May 30 22:23:08 2012 (r236338) @@ -15,7 +15,7 @@ NO_SHARED?= YES .endif # Version has the RYYYYMMDDX format, where R is from RELENG_ -CFLAGS+=-DMAKE_VERSION=\"5201111300\" +CFLAGS+=-DMAKE_VERSION=\"10201120530\" # There is no obvious performance improvement currently. # CFLAGS+=-DUSE_KQUEUE Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/make.1 Wed May 30 22:23:08 2012 (r236338) @@ -902,6 +902,7 @@ Replaces each word in the variable with Replaces each word in the variable with everything but the last component. .It Cm :L Converts variable to lower-case letters. +(deprecated) .It Cm :M Ns Ar pattern Select only those words that match the rest of the modifier. The standard shell wildcard characters @@ -993,8 +994,13 @@ to be replaced in .Ar new_string . .It Cm :T Replaces each word in the variable with its last component. +.It Cm :tl +Converts variable to lower-case letters. +.It Cm :tu +Converts variable to upper-case letters. .It Cm :U Converts variable to upper-case letters. +(deprecated) .It Cm :u Remove adjacent duplicate words (like .Xr uniq 1 ) . @@ -1742,6 +1748,19 @@ is set to the same value as .Va .MAKE ; support for this may be removed in the future. .Pp +The use of the +.Cm :L +and +.Cm :U +modifiers are deprecated +in +.Fx 10.0 +and the more portable (among Pmake decedents) +.Cm :tl +and +.Cm :tu +should be used instead. +.Pp Most of the more esoteric features of .Nm should probably be avoided for greater compatibility. Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Wed May 30 22:21:25 2012 (r236337) +++ head/usr.bin/make/var.c Wed May 30 22:23:08 2012 (r236338) @@ -1746,6 +1746,19 @@ ParseModifier(VarParser *vp, char startc case 'C': newStr = modifier_C(vp, value, v); break; + case 't': + /* :tl :tu for OSF ODE & NetBSD make compatibility */ + switch (vp->ptr[1]) { + case 'l': + vp->ptr++; + goto mod_lower; + break; + case 'u': + vp->ptr++; + goto mod_upper; + break; + } + /* FALLTHROUGH */ default: if (vp->ptr[1] != endc && vp->ptr[1] != ':') { #ifdef SUNSHCMD @@ -1774,6 +1787,7 @@ ParseModifier(VarParser *vp, char startc switch (vp->ptr[0]) { case 'L': + mod_lower: { const char *cp; Buffer *buf; @@ -1799,6 +1813,7 @@ ParseModifier(VarParser *vp, char startc vp->ptr++; break; case 'U': + mod_upper: { const char *cp; Buffer *buf;