diff options
author | Paul Smith <psmith@gnu.org> | 1999-07-16 02:25:03 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1999-07-16 02:25:03 +0000 |
commit | a3cf773e296968870eaa76d45323690d14d9b44e (patch) | |
tree | 81bdb5281ca81831c7dc268d903b4a28406df3d9 /read.c | |
parent | 9d89ad56bf74b22471617ed99f9e6e6272efba22 (diff) | |
download | gunmake-a3cf773e296968870eaa76d45323690d14d9b44e.tar.gz |
* Various bug fixes.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -530,6 +530,9 @@ read_makefile (filename, flags) else { p2 = next_token (p + 6); + if (*p2 == '\0') + fatal (&fileinfo, "empty variable name"); + /* Let the variable name be the whole rest of the line, with trailing blanks stripped (comments have already been removed), so it could be a complex variable/function @@ -545,7 +548,7 @@ read_makefile (filename, flags) if (word1eq ("override", 8)) { p2 = next_token (p + 8); - if (p2 == 0) + if (*p2 == '\0') error (&fileinfo, "empty `override' directive"); if (!strncmp (p2, "define", 6) && (isblank (p2[6]) || p2[6] == '\0')) { @@ -554,6 +557,9 @@ read_makefile (filename, flags) else { p2 = next_token (p2 + 6); + if (*p2 == '\0') + fatal (&fileinfo, "empty variable name"); + /* Let the variable name be the whole rest of the line, with trailing blanks stripped (comments have already been removed), so it could be a complex variable/function @@ -566,7 +572,7 @@ read_makefile (filename, flags) } else if (!ignoring && !try_variable_definition (&fileinfo, p2, o_override)) - error (&fileinfo, "empty `override' directive"); + error (&fileinfo, "invalid `override' directive"); continue; } |