--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I usually do this with `ninja | cat` when I want it. I rarely want it though – what's your use case for wanting to see which files have been recompiled?
Hi,
On Friday, November 25, 2016 at 5:45:20 PM UTC+1, Nico Weber wrote:I usually do this with `ninja | cat` when I want it. I rarely want it though – what's your use case for wanting to see which files have been recompiled?
You're right, "ninja | cat" is also working.
If I have modified a .c file, I want to check that this file has been recompiled (on some large projects, some files are not always compiled, depending on the configuration).
If I have modified a .h file, I want to make sure that all files that I'm expecting to recompile have really been recompiled.
More generally, I like to see what has been done.
I don't really understand the benefit of overwriting the same line... There is no speed benefit. This will just reduce the scrolling of the terminal, but some information is lost.
You can pass `path/to/file.cc^` (with the caret) as argument to ninja to say "build the first output depending on this input". For .c files, this will build the .o file, for .h files it will build some .o file of a .c file including the .h. I have a "build current file" binding in my editor that uses this (https://cs.chromium.org/chromium/src/tools/vim/ninja-build.vim – this can probably look simpler in most projects).When I work on chromium, I usually build some unit test binary for the files I'm working on, that way I'm sure that the files I'm working on are being compiled. Most generators also generate an "all" target that builds all files in your project.
I think the philosophy behind the behavior is that tools should be silent, except if something goes wrong. In Chromium, ninja being much more quiet by default than, say, make, made compiler warnings much more visible, enough so that they were annoying to some on the project and it led to us fixing all our build warnings. A build of chrome now produces 1 line of output, which has a relaxing property to it somehow. (And if someone adds build noise, it's very visible and people fix it quickly.)
So maybe try to get used to the output for a while, maybe it'll grow on you :-) If not, `ninja | cat` does roughly what you want.