Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): extend comments in dir.c



details:   https://anonhg.NetBSD.org/src/rev/a9708b9fb4e7
branches:  trunk
changeset: 950251:a9708b9fb4e7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Jan 23 11:44:10 2021 +0000

description:
make(1): extend comments in dir.c

diffstat:

 usr.bin/make/dir.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 8476fca58265 -r a9708b9fb4e7 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Jan 23 11:34:41 2021 +0000
+++ b/usr.bin/make/dir.c        Sat Jan 23 11:44:10 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.260 2021/01/23 11:34:41 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.261 2021/01/23 11:44:10 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -138,7 +138,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.260 2021/01/23 11:34:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.261 2021/01/23 11:44:10 rillig Exp $");
 
 /*
  * A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -634,7 +634,9 @@
  * This is incomplete -- wildcards are only expanded in the final path
  * component, but not in directories like src/lib*c/file*.c, but it
  * will do for now (now being 1993 until at least 2020). To expand these,
- * use the ':sh' variable modifier such as in ${:!echo src/lib*c/file*.c!}.
+ * delegate the work to the shell, using the '!=' variable assignment
+ * operator, the ':sh' variable modifier or the ':!...!' variable modifier,
+ * such as in ${:!echo src/lib*c/file*.c!}.
  *
  * Input:
  *     pattern         Pattern to look for
@@ -668,7 +670,8 @@
                 * directory cache.
                 *
                 * This means that the pattern '[a-z.]*' does not find
-                * '.file', which is consistent with bash, NetBSD sh and csh.
+                * '.file', which is consistent with NetBSD sh, NetBSD ksh,
+                * bash, dash, csh and probably many other shells as well.
                 */
                if (base[0] == '.' && pattern[0] != '.')
                        continue;



Home | Main Index | Thread Index | Old Index