summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-07-15 00:22:56 +0000
committerRoland McGrath <roland@redhat.com>1993-07-15 00:22:56 +0000
commitfc8fa162531583422e11d6db9794f2b98e639b32 (patch)
tree9ba8bcfe247c7957021b32263c46997447d5be1d
parentca3b88c66a6be3cbb34fd81271ed39908d6bedfc (diff)
downloadgunmake-fc8fa162531583422e11d6db9794f2b98e639b32.tar.gz
Formerly variable.c.~22~
-rw-r--r--variable.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/variable.c b/variable.c
index 546575e..1004345 100644
--- a/variable.c
+++ b/variable.c
@@ -389,6 +389,7 @@ define_automatic_variables ()
int export_all_variables;
/* Create a new environment for FILE's commands.
+ If FILE is nil, this is for the `shell' function.
The child's MAKELEVEL variable is incremented. */
char **
@@ -408,14 +409,18 @@ target_environment (file)
char **result;
unsigned int mklev_hash;
+ if (file == 0)
+ s = current_variable_set_list;
+ else
+ s = file->variables;
+
/* Find the lowest number of buckets in any set in the list. */
- s = file->variables;
buckets = s->set->buckets;
for (s = s->next; s != 0; s = s->next)
if (s->set->buckets < buckets)
buckets = s->set->buckets;
- /* Find the hash value of `MAKELEVEL' will fall into. */
+ /* Find the hash value of the bucket `MAKELEVEL' will fall into. */
{
char *p = "MAKELEVEL";
mklev_hash = 0;