diff options
author | Mattias Andrée <maandree@kth.se> | 2024-02-11 22:00:03 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-02-11 22:00:03 +0100 |
commit | 7321030f3e0b5041d719405d38d3572946e57add (patch) | |
tree | f7ee0b9c8a4aa5c32cef6f4940c944e27d28f3e3 /makeenv.c | |
parent | Fix bugs, and some cleanup (diff) | |
download | makeenv-7321030f3e0b5041d719405d38d3572946e57add.tar.gz makeenv-7321030f3e0b5041d719405d38d3572946e57add.tar.bz2 makeenv-7321030f3e0b5041d719405d38d3572946e57add.tar.xz |
Fail if .makeenv has a line that starts with =
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'makeenv.c')
-rw-r--r-- | makeenv.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -317,8 +317,12 @@ main(int argc, char *argv[]) put_options(line); } else if (has_equals) { trim_around_equals(line); - if (*line != '=' && *line != '#') + if (*line == '=') { + fprintf(stderr, "%s: empty variable name listed in .makeenv\n", argv0); + return 125; + } else if (*line != '#') { put_macro(line); + } } else { if (*line && *line != '#') put_targets(line); |