[Buildroot] [PATCH RFC] core: enable per-package log files

Anisse Astier anisse at astier.eu
Wed Oct 18 08:09:11 UTC 2017


Hi,

On Wed, Oct 18, 2017 at 09:58:26AM +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 18 Oct 2017 09:44:36 +0200, Anisse Astier wrote:
> 
> > > I'm not sure how to handle the MESSAGE macro. One suggestion you made
> > > was to output directly to the tty. But a big drawback of that is that
> > > if you redirect the build output (make 2>&1 | tee logfile) then the
> > > messages displayed by the MESSAGE macro will no longer be stored in the
> > > logfile, which is super annoying: I always use them to navigate in the
> > > logfile to the appropriate place. So I believe directly writing to the
> > > tty in the MESSAGE macro is not a good option.  
> > 
> > I think Arnout meant that the MESSAGE macro could write to both the tty
> > (if available) and stdout, hence getting the best of both worlds.
> 
> Well, in this case, you'd get the message twice on your terminal if you
> run "make 2>&1 | tee logfile". Only one of the two will be saved in the
> log file, but both of them will be visible on your tty.

It should be possible to detect if stdout is a tty or a pipe, and not
print on the tty when it's already one.

Also, I think that the tee to a logfile should be done by default, at
least in a parallel make environment, just to make sure the last build
log is kept, can be sent without copy/pasting issues in terminals, etc.
In this case, you don't need to do it manually when invoking buildroot
make.

Regards,

Anisse



More information about the buildroot mailing list