diff options
author | Paul Smith <psmith@gnu.org> | 1998-10-13 20:59:08 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 1998-10-13 20:59:08 +0000 |
commit | 394864015453ce78c822e6457df04fe483f4bfb0 (patch) | |
tree | 22f24043d01395fa9197c32c7ab5e2ed4c521e4f /job.c | |
parent | 2c64fb221a265f9e7fc93374906b1e7540377561 (diff) | |
download | gunmake-394864015453ce78c822e6457df04fe483f4bfb0.tar.gz |
Ignore non-empty lines which become empty after variable expansion.
Don't choke on invalid pattern rules if we fail during makefile parsing.
Don't dump core if a non-empty command becomes empty after expansion.
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1274,11 +1274,16 @@ new_job (file) c->sh_batch_file = NULL; /* Fetch the first command line to be run. */ - job_next_command (c); - - /* The job is now primed. Start it running. - (This will notice if there are in fact no commands.) */ - (void)start_waiting_job (c); + if (job_next_command (c)) + /* The job is now primed. Start it running. */ + (void)start_waiting_job (c); + else + { + /* There were no commands (variable expands to empty?). All done. */ + c->file->update_status = 0; + notice_finished_file(c->file); + free_child (c); + } if (job_slots == 1) /* Since there is only one job slot, make things run linearly. |