diff options
author | ru <ru@FreeBSD.org> | 2003-09-08 08:23:29 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2003-09-08 08:23:29 +0000 |
commit | dd38dd539886745d07d31321152d8c9e788985d6 (patch) | |
tree | 5f204ae0ad02e41d7bf33ee0d18bcb0392d53e57 /usr.bin/make/for.c | |
parent | 9d24d6d9b75022d8c50d3a87accefdfdd83eca86 (diff) | |
download | FreeBSD-src-dd38dd539886745d07d31321152d8c9e788985d6.zip FreeBSD-src-dd38dd539886745d07d31321152d8c9e788985d6.tar.gz |
Command line variables take precedence over global variables.
Make this true in the .for loops too. The following fragment,
FOO= foo bar
all:
.for f in ${FOO}
@echo ${f}
.endfor
when run as "make FOO=xxx" should print "xxx". (OpenBSD had
this bug fixed for some time.)
Diffstat (limited to 'usr.bin/make/for.c')
-rw-r--r-- | usr.bin/make/for.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index 87890af..a194ef9 100644 --- a/usr.bin/make/for.c +++ b/usr.bin/make/for.c @@ -172,7 +172,7 @@ For_Eval (char *line) */ forLst = Lst_Init(FALSE); buf = Buf_Init(0); - sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE); + sub = Var_Subst(NULL, ptr, VAR_CMD, FALSE); #define ADDWORD() \ Buf_AddBytes(buf, ptr - wrd, (Byte *) wrd), \ |