Disable this for now, VAR_CMD is abused for other purposes...
This commit is contained in:
parent
69e96f0544
commit
db7f6ac403
|
@ -302,5 +302,5 @@ three FU=<v>bar</v> FOO=<v>goo</v> VAR=<v></v>
|
|||
four FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
|
||||
five FU=<v>bar</v> FOO=<v>goo</v> VAR=<v>Internal</v>
|
||||
five v=is x k=is x
|
||||
six v=is y k=is y
|
||||
show-v v=override k=override
|
||||
six v=is x k=is x
|
||||
show-v v=override k=is x
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: var.c,v 1.129 2008/05/14 14:27:02 sjg Exp $ */
|
||||
/* $NetBSD: var.c,v 1.130 2008/05/15 18:25:12 sjg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
|
@ -69,14 +69,14 @@
|
|||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.129 2008/05/14 14:27:02 sjg Exp $";
|
||||
static char rcsid[] = "$NetBSD: var.c,v 1.130 2008/05/15 18:25:12 sjg Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: var.c,v 1.129 2008/05/14 14:27:02 sjg Exp $");
|
||||
__RCSID("$NetBSD: var.c,v 1.130 2008/05/15 18:25:12 sjg Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
@ -746,12 +746,14 @@ Var_Set(const char *name, const char *val, GNode *ctxt, int flags)
|
|||
name = Var_Subst(NULL, cp, ctxt, 0);
|
||||
} else
|
||||
name = cp;
|
||||
#ifdef skip_global_if_cmd
|
||||
if (ctxt == VAR_GLOBAL) {
|
||||
v = VarFind(name, VAR_CMD, 0);
|
||||
if (v != (Var *)NIL) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
v = VarFind(name, ctxt, 0);
|
||||
if (v == (Var *)NIL) {
|
||||
VarAdd(name, val, ctxt);
|
||||
|
@ -783,7 +785,9 @@ Var_Set(const char *name, const char *val, GNode *ctxt, int flags)
|
|||
|
||||
Var_Append(MAKEOVERRIDES, name, VAR_GLOBAL);
|
||||
}
|
||||
#ifdef skip_global_if_cmd
|
||||
out:
|
||||
#endif
|
||||
if (name != cp)
|
||||
free(UNCONST(name));
|
||||
if (v != (Var *)NIL)
|
||||
|
|
Loading…
Reference in New Issue