mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-26 05:57:17 +00:00
Formerly variable.c.~19~
This commit is contained in:
parent
db6a102206
commit
17bc902648
1 changed files with 11 additions and 1 deletions
12
variable.c
12
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);
|
||||
|
|
Loading…
Reference in a new issue