bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #33138] .PARLLELSYNC enhancement with patch


From: Frank Heckenbach
Subject: Re: [bug #33138] .PARLLELSYNC enhancement with patch
Date: Sat, 04 May 2013 03:49:42 +0200

Paul Smith wrote:

> On Sun, 2013-04-28 at 20:00 +0300, Eli Zaretskii wrote:
> > > I've pushed a change to add a new argument to the -O/--output-sync
> > > option, "job", to write output after each line of the recipe.
> > 
> > What is its purpose?  To avoid mixing in the same screen line
> > characters from several parallel sub-makes?  (That does happen, albeit
> > rarely.)  Or is it something else?
> 
> I'm not sure exactly what you mean by your second sentence.  However I
> asked the same question you did about this feature.
> 
> Frank had a use-case: he was tracking which jobs were active/still
> running by making all his recipes look like this:
> 
>   target:
>           @echo start: $@
>           ... recipe ...
>           @echo end: $@
> 
> This allows a higher-level, dynamic interface to track which jobs are
> running, when they started, etc. and track the build.

Indeed. And to answer Eli's direct question: Yes, it avoids mixing
output from several parallel sub-makes, but not only characters in
the same line (that's rare indeed), but also, e.g. several distinct
messages produce by two parallel jobs, e.g. this won't happen:

foo.c:1: blah
bar.c:1: blah
foo.c:2: blah
bar.c:2: blah

> Although I implemented this because it was simple, I'm not so sure this
> is a real use-case.  Or to be more accurate, I agree that it's a real
> use-case but I don't think this is a good solution to the problem.
> 
> I suspect that a better solution might be to create a "machine
> interface" mode for make, as some other GNU CLI tools like GDB, etc.
> have.  This interface would be well-defined and unchanging and easily
> machine-parseable, and allow people to write front-ends to more
> accurately examine make's output.

Sure, it would even simplify my job -- I wouldn't have to put
start/end messages in (selected) recipes manually, but could just
get information about all running command lines (and possibly filter
out uninteresting ones).

But I guess implementation of this feature in make is a bit more
work, so for my purpose I went the (at the moment) easier route.

If you'd ever like to implement such an interface, please let me
know (CC, as I'm not subscribed). I might be able to give some
input, or at least test it with my use cases. (FWIW, what I'd like
of such a feature is that it's text (line) based, so it can easily
be parsed by scripts, and that it in some form contains the target
name and the command line.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]