]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Formerly job.c.~104~
authorRoland McGrath <roland@redhat.com>
Fri, 25 Jun 1993 20:03:56 +0000 (20:03 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 25 Jun 1993 20:03:56 +0000 (20:03 +0000)
job.c

diff --git a/job.c b/job.c
index 4fefeecd010184f45b0958761a4ec67bd33ecc08..ee10f062a0f80481bc0bde05efcd42d86eafabfa 100644 (file)
--- a/job.c
+++ b/job.c
@@ -1390,10 +1390,20 @@ construct_command_argv (line, restp, file)
      char *line, **restp;
      struct file *file;
 {
-  char *shell = allocated_variable_expand_for_file ("$(SHELL)", file);
-  char *ifs = allocated_variable_expand_for_file ("$(IFS)", file);
+  char *shell, *ifs;
   char **argv;
 
+  {
+    /* Turn off --warn-undefined-variables while we expand SHELL and IFS.  */
+    int save = warn_undefined_variables_flag;
+    warn_undefined_variables_flag = 0;
+
+    shell = allocated_variable_expand_for_file ("$(SHELL)", file);
+    ifs = allocated_variable_expand_for_file ("$(IFS)", file);
+
+    warn_undefined_variables_flag = save;
+  }
+
   argv = construct_command_argv_internal (line, restp, shell, ifs);
 
   free (shell);