diff options
author | Paul Smith <psmith@gnu.org> | 2014-01-11 16:10:02 -0500 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2014-01-12 10:54:29 -0500 |
commit | 9c8b68a905871882905fad6ca72c499a98bc2513 (patch) | |
tree | 15fbacf2c7c6f3f9f2b58dda5beb210dbc69cb6d /main.c | |
parent | 432cb6575d469d4d7575d420f83990437b837f43 (diff) | |
download | gunmake-9c8b68a905871882905fad6ca72c499a98bc2513.tar.gz |
* main.c (die): Close output_context AND make_sync.
die() can be invoked inside a separate output_context, if the
$(error ...) function is expanded as part of a recipe.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -3406,9 +3406,14 @@ die (int status) if (output_context) { - assert (output_context == &make_sync); + /* die() might be called in a recipe output context due to an + $(error ...) function. */ + output_close (output_context); + + if (output_context != &make_sync) + output_close (&make_sync); + OUTPUT_UNSET (); - output_close (&make_sync); } output_close (NULL); |