summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2010-11-30 14:48:52 +0000
committerPaul Smith <psmith@gnu.org>2010-11-30 14:48:52 +0000
commitae2ab76faca93cad3059808b14d02f5565275e31 (patch)
tree3c4065c573c2e2af58596efedaa0595f793f7f04 /read.c
parent391456aad790172c3cbbceb5544dd785c0e60a99 (diff)
downloadgunmake-ae2ab76faca93cad3059808b14d02f5565275e31.tar.gz
Check if the target-specific variable is the same as the global
variable, and if so don't try to update it. Savannah bug #31743.
Diffstat (limited to 'read.c')
-rw-r--r--read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read.c b/read.c
index 7b5b0dd..761e976 100644
--- a/read.c
+++ b/read.c
@@ -1802,7 +1802,8 @@ record_target_var (struct nameseq *filenames, char *defn,
int len = strlen(v->name);
gv = lookup_variable (v->name, len);
- if (gv && (gv->origin == o_env_override || gv->origin == o_command))
+ if (gv && v != gv
+ && (gv->origin == o_env_override || gv->origin == o_command))
{
if (v->value != 0)
free (v->value);