summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-09-08 08:23:29 +0000
committerru <ru@FreeBSD.org>2003-09-08 08:23:29 +0000
commitdd38dd539886745d07d31321152d8c9e788985d6 (patch)
tree5f204ae0ad02e41d7bf33ee0d18bcb0392d53e57 /usr.bin/make
parent9d24d6d9b75022d8c50d3a87accefdfdd83eca86 (diff)
downloadFreeBSD-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')
-rw-r--r--usr.bin/make/for.c2
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), \
OpenPOWER on IntegriCloud