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: document an example for a 'chain of modif...



details:   https://anonhg.NetBSD.org/src/rev/3c738dc91931
branches:  trunk
changeset: 953670:3c738dc91931
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Mar 15 19:02:57 2021 +0000

description:
make: document an example for a 'chain of modifiers'

No functional change.

diffstat:

 usr.bin/make/var.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 72da1177e462 -r 3c738dc91931 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Mon Mar 15 18:56:37 2021 +0000
+++ b/usr.bin/make/var.c        Mon Mar 15 19:02:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.888 2021/03/15 18:56:37 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.889 2021/03/15 19:02:57 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.888 2021/03/15 18:56:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.889 2021/03/15 19:02:57 rillig Exp $");
 
 typedef enum VarFlags {
        VFL_NONE        = 0,
@@ -2063,6 +2063,14 @@
  * For indirect modifiers, the effects of this data stop after the indirect
  * modifiers have been applied.
  *
+ * For example, the expression ${VAR:M*:${indirect}:O:u} has 3 chains of
+ * modifiers:
+ *
+ *     Chain 1 is ':M', consisting of a single modifier.
+ *     Chain 2 is whatever modifiers are in the value of the variable named
+ *         'indirect'.
+ *     Chain 3 is ':O:u', consisting of the 2 modifiers ':O' and ':u'.
+ *
  * It may or may not have been intended that 'defined' has scope Expr while
  * 'sep' and 'oneBigWord' have smaller scope.
  *



Home | Main Index | Thread Index | Old Index