summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-08-09 22:11:17 +0000
committerRoland McGrath <roland@redhat.com>1993-08-09 22:11:17 +0000
commit8980e490364ac4ef4a5e949f31ce25f790f02a8e (patch)
tree3ddc86adfe0909a7b960b70b7e172ab5e46f04bf /function.c
parent84b4d9cce4b69aba54c91d5604bdb13412a04bc7 (diff)
downloadgunmake-8980e490364ac4ef4a5e949f31ce25f790f02a8e.tar.gz
Formerly function.c.~29~
Diffstat (limited to 'function.c')
-rw-r--r--function.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/function.c b/function.c
index c918ec9..c2436bd 100644
--- a/function.c
+++ b/function.c
@@ -337,8 +337,18 @@ expand_function (o, function, text, end)
if (argv == 0)
break;
+ /* Using a target environment for `shell' loses in cases like:
+ export var = $(shell echo foobie)
+ because target_environment hits a loop trying to expand $(var)
+ to put it in the environment. This is even more confusing when
+ var was not explicitly exported, but just appeared in the
+ calling environment. */
+#if 1
+ envp = environ;
+#else
/* Construct the environment. */
envp = target_environment ((struct file *) 0);
+#endif
/* For error messages. */
if (reading_filename != 0)