[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: output from $(error) lost with output sync
From: |
Frank Heckenbach |
Subject: |
Re: output from $(error) lost with output sync |
Date: |
Tue, 14 Jan 2014 06:21:24 +0100 |
Oliver Kiddle wrote:
> Given the following Makefile, the output from the error function is
> being lost when the gmake 4 output-sync is enabled:
>
> [...]
With assertions active I even get this error:
% make -O
make: main.c:3409: die: Assertion `output_context == &make_sync'
failed.
Aborted
I tried inserting "OUTPUT_UNSET ();" in func_error(), case 'e'. This
fixes the above problem, but still fails with fatal() called from
other functions, e.g.:
foo:
echo $(wordlist 0, 0, foo)
So the problem is more general. ISTM the assumption in die() that
output_context is either NULL or &make_sync is just not valid, since
fatal() can be called from basically anywhere. So I made this change
which seems to fix the problem.
--- main.c.orig 2014-01-14 05:55:19.000000000 +0100
+++ make/main.c 2014-01-14 06:14:00.000000000 +0100
@@ -3406,9 +3406,8 @@
if (output_context)
{
- assert (output_context == &make_sync);
+ output_close (output_context);
OUTPUT_UNSET ();
- output_close (&make_sync);
}
output_close (NULL);