Module Name:    src
Committed By:   dsl
Date:           Thu Oct  1 21:40:31 UTC 2009

Modified Files:
        src/usr.bin/make: make.1

Log Message:
Add example of how to use the ?: modifier properly.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/make.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/make.1
diff -u src/usr.bin/make/make.1:1.161 src/usr.bin/make/make.1:1.162
--- src/usr.bin/make/make.1:1.161	Tue Sep  8 17:29:20 2009
+++ src/usr.bin/make/make.1	Thu Oct  1 21:40:31 2009
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.161 2009/09/08 17:29:20 sjg Exp $
+.\"	$NetBSD: make.1,v 1.162 2009/10/01 21:40:31 dsl Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd September 7, 2009
+.Dd October 1, 2009
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -1061,8 +1061,11 @@
 Since the variable name is used as the expression, \&:\&? must be the
 first modifier after the variable name itself - which will, of course,
 usually contain variable expansions.
-If the expression is a single token, it will likely be treated as a check
-for the name being defined.
+A common error is trying to use expressions like
+.Dl ${NUMBERS:M42:?match:no}
+which actually tests defined(NUMBERS),
+to determine is any words match "42" you need to use something like:
+.Dl ${${NUMBERS:M42} != "":?match:no} .
 .It Ar :old_string=new_string
 This is the
 .At V

Reply via email to