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
commit03e2347f92e6484f2a4b6df5ee98b846f38ff4df (patch)
tree3c4065c573c2e2af58596efedaa0595f793f7f04 /read.c
parent1208b1e7e0afa6fb5cced1e822fe34008902ef26 (diff)
downloadmake-03e2347f92e6484f2a4b6df5ee98b846f38ff4df.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 7b5b0dd0..761e9763 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);