summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2005-12-14 13:11:18 +0000
committerBoris Kolpackov <boris@kolpackov.net>2005-12-14 13:11:18 +0000
commit3d0d9e5d75eecd48d106918e0f568590f67fc26a (patch)
tree6e6df8bedeb15bcf6f643a48a8295f2637016302
parent4bd6db9df127f74a0fd957ddbda4743a9c22e053 (diff)
downloadgunmake-3d0d9e5d75eecd48d106918e0f568590f67fc26a.tar.gz
Fixed record_target_var to initialize variable's export field with v_default
instead of leaving it "initialized" by whatever garbage happened to be on the heap.
-rw-r--r--ChangeLog6
-rw-r--r--read.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c11145..afaba6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-14 Boris Kolpackov <boris@kolpackov.net>
+
+ * read.c (record_target_var): Initialize variable's export field
+ with v_default instead of leaving it "initialized" by whatever
+ garbage happened to be on the heap.
+
2005-12-12 Paul D. Smith <psmith@gnu.org>
* make.1: Fix some display errors and document all existing options.
diff --git a/read.c b/read.c
index 660b11a..f7e06ba 100644
--- a/read.c
+++ b/read.c
@@ -1838,8 +1838,7 @@ record_target_var (struct nameseq *filenames, char *defn,
/* Set up the variable to be *-specific. */
v->origin = origin;
v->per_target = 1;
- if (exported)
- v->export = v_export;
+ v->export = exported ? v_export : v_default;
/* If it's not an override, check to see if there was a command-line
setting. If so, reset the value. */