summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-02-21 19:28:30 +0000
committerRoland McGrath <roland@redhat.com>1993-02-21 19:28:30 +0000
commit17bc902648fb3e8217e649201165f810304ba093 (patch)
tree56c179c7c6b192e079cfc64c9c2faa0b7cacbbd8
parentdb6a102206e6f4f2e16f447c51b799a53c3b9718 (diff)
downloadmake-17bc902648fb3e8217e649201165f810304ba093.tar.gz
Formerly variable.c.~19~
-rw-r--r--variable.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 9ff04c4..ab29f02 100644
--- a/variable.c
+++ b/variable.c
@@ -548,7 +548,9 @@ target_environment (file)
If not, NULL is returned. */
struct variable *
-try_variable_definition (line, origin)
+try_variable_definition (filename, lineno, line, origin)
+ char *filename;
+ unsigned int lineno;
char *line;
enum variable_origin origin;
{
@@ -594,6 +596,14 @@ try_variable_definition (line, origin)
expanded_name = allocated_variable_expand (name);
free (name);
+ if (expanded_name[0] == '\0')
+ {
+ if (filename == 0)
+ fatal ("empty variable name");
+ else
+ makefile_fatal (filename, lineno, "empty variable name");
+ }
+
v = define_variable (expanded_name, strlen (expanded_name),
recursive ? p : variable_expand (p),
origin, recursive);