diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-05-05 12:57:49 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-05-05 12:57:49 +0000 |
commit | ecdd9a2f8dba233e50fb8870b22ae2fe9fc46a8f (patch) | |
tree | 1815ef5313128d55c2c8870e3bbc495b4db10d69 /usr.bin | |
parent | 38587fce16d5f981fd110d5d389e76697aef6ed9 (diff) |
Document for loop mechanics for several variables.
Idea taken from NetBSD. implementation completely different,
as our loop implementation diverged a while back.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/make.1 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index a33e9696d7a..9155e3c6528 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: make.1,v 1.40 2001/05/03 14:00:58 espie Exp $ +.\" $OpenBSD: make.1,v 1.41 2001/05/05 12:57:48 espie Exp $ .\" $OpenPackages$ .\" $NetBSD: make.1,v 1.18 1997/03/10 21:19:53 christos Exp $ .\" @@ -945,6 +945,7 @@ The syntax of a for loop is: .It Xo .Ic \&.for .Ar variable +.Op Ar variable ... .Ic in .Ar expression .Xc @@ -958,11 +959,17 @@ The syntax of a for loop is: After the for .Ar expression is evaluated, it is split into words. -The iteration -.Ar variable -is successively set to each word, and substituted in the +On each iteration of the loop, one word is assigned to each +.Ar variable , +in order, +and these +.Ar variables +are substituted in the .Ic make-rules inside the body of the for loop. +The number of words must match the number of iteration variables; +that is, if there are three iteration variables, the number of words +must be a multiple a three. .Sh COMMENTS Comments begin with a hash .Pq Ql \&# |