diff options
| author | rillig <rillig@NetBSD.org> | 2021-03-15 19:02:57 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2021-03-15 19:02:57 +0000 |
| commit | 6ace71bfe4cfd11c6a8a7cc534c752d2d50a6be8 (patch) | |
| tree | 9065ca9a559c5dc2c9d5b410062afe5e94754695 /usr.bin/make | |
| parent | b5010993f6d2de6482fb418a9a1095b831f559ad (diff) | |
make: document an example for a 'chain of modifiers'
No functional change.
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/var.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index cf9d7484dd3..8d5f74f1b16 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -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 @@ typedef struct Expr { * 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. * |
