[Omake] Re: Output verbosity

David Kågedal davidk at lysator.liu.se
Tue Jun 19 00:35:31 PDT 2007


Aleksey Nogin <anogin at hrl.com> writes:

> On 18.06.2007 04:09, David Kågedal wrote:
>
>> I have a couple of questions/requests regarding the output of omake.
>> 1) I'd like to see an option to only print the lines describing what
>>    is build, i.e. the lines beginning with "- build" when running
>>    omake -verbose.  From looking at the source, there doesn't seem to
>>    exist any option to do that.
>
> Right, I believe that currently the "-" and "+" lines are always on or
> off together (unless there is an "@" prefix in the command). Should be
> relatively easy to change - if you feel that it's important, please
> file an RFE in Bugzilla. You can disable the command output using
> "--output-only-errors".

That's the default, isn't it?

I think I'll take this as an exercise in working with the omake
sources :-)

>> 2) Is there a make to produce output from a rule without triggering
>>    the verbose output for that target (including "-" and "+" lines)?
>>    I'm running with the default options.  I'd like to be able to add
>>    the equivalent of a "@echo Building cool stuff" when running make
>>    in silent mode.
>>
> Yes - you can use the fact that the options are scoped and add a local
> override.
>
> % cat OMakefile
> .PHONY: foo bar
> .DEFAULT: foo
>
> section
>     OMakeFlags(-s)
>     bar:
>         @echo This is bar
>
> foo: bar
>     @echo This is foo

It doesn't really help me, because I want real commands in the rule as
well, and they should behave normally.

foo: bar
    @echo Rebuilding foo
    rebuild $< $@

So if this rule is invoked I'd like the "Rebuilding foo" output to
appear, and only if something goes wrong should the rebuild command be
shown.

This isn't terribly important, but it seems like a limitation.

Another thing I noticed when testing this is that when a command in a
rule fails, but doesn't produce any output, you won't see what the
failing command was with default omake options.

Consider the following rule:

    foo:
        false

If I run "omake foo" with this, I get this output:

*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.0 sec)
*** omake: 10/11 targets are up to date
*** omake: failed (0.1 sec, 0/0 scans, 1/1 rules, 0/61 digests)
*** omake: targets were not rebuilt because of errors:
   <phony <foo>>

This will make users scratch their head until they try again with
--verbose.  But I think that the "- exit" line that appears with
--verbose or --print-exit would be very helpful in this case.

So my suggestion is to always print the exit status line when the exit
status is nonzero.

-- 
David Kågedal



More information about the Omake mailing list