summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-06-25 20:03:54 +0000
committerRoland McGrath <roland@redhat.com>1993-06-25 20:03:54 +0000
commitf84518396b4bb4374964e8e515be0f27b05af4cd (patch)
tree7d6005160dfe38c7568ca079a19c7ce8fe9b69c5
parent2e0e3d22ec80c3aab2794ecababdc3095410246d (diff)
downloadgunmake-f84518396b4bb4374964e8e515be0f27b05af4cd.tar.gz
Formerly read.c.~64~
-rw-r--r--read.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/read.c b/read.c
index 56cc96c..6855e08 100644
--- a/read.c
+++ b/read.c
@@ -122,10 +122,20 @@ read_all_makefiles (makefiles)
default makefiles and don't let the default goal come from there. */
{
- char *value = allocated_variable_expand ("$(MAKEFILES)");
+ char *value;
char *name, *p;
unsigned int length;
+ {
+ /* Turn off --warn-undefined-variables while we expand MAKEFILES. */
+ int save = warn_undefined_variables_flag;
+ warn_undefined_variables_flag = 0;
+
+ value = allocated_variable_expand ("$(MAKEFILES)");
+
+ warn_undefined_variables_flag = save;
+ }
+
/* Set NAME to the start of next token and LENGTH to its length.
MAKEFILES is updated for finding remaining tokens. */
p = value;
@@ -1766,8 +1776,20 @@ tilde_expand (name)
if (name[1] == '/' || name[1] == '\0')
{
extern char *getenv ();
- char *home_dir = allocated_variable_expand ("$(HOME)");
- int is_variable = home_dir[0] != '\0';
+ char *home_dir;
+ int is_variable;
+
+ {
+ /* Turn off --warn-undefined-variables while we expand HOME. */
+ int save = warn_undefined_variables_flag;
+ warn_undefined_variables_flag = 0;
+
+ home_dir = allocated_variable_expand ("$(HOME)");
+
+ warn_undefined_variables_flag = save;
+ }
+
+ is_variable = home_dir[0] != '\0';
if (!is_variable)
{
free (home_dir);