开发者

Can I make Make arrange error messages it prints in parallel mode?

I have simple question, I compile a C program with flag -j

make -j4

How I can make all four processes write error messages successively (one error after another)? Currently, when I start make -j4, I get errors then some ©mpilation commands, then some errors again. It is not readable! Is there sometihng to assist me?

zile.c: In function 'zile':
zile.c:12: error: 'milojko' undeclared (first use in this function)

zile.c:12: error: (Each undeclared identifier is reported only once
zile.c:12: error: for each function it appears in.)

zile.c:13: error: 'djole' undeclared (first use in this function)
make: *** [zile.o] Error 1
/opt/toolchains/arm-uclibceabi-9260-big/usr/bin/arm-linux-gcc -I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT -Wall -pipe -D__XENO__ -I/opt/toolchains/arm-uclibceabi-9260-big/usr/include/ -O3 -Wall   -c -o testSine.o testSine.c
testSine.c:7: error: expected ')' before 't'

make: *** [testSine.o] Error 1

What I want is something like this:

error from process one
error from process four
error from process three
error from process two

, without commands min开发者_JAVA百科gling with errors.


Nope. No real help on this point. As you know, the -j option starts as many different processes as required to fasten compilation (provided that dependencies allows).

These processes are completely unsynchronized. make simply control when it starts the processes, and wait for them to finish. make does not synchronize the output of all these various processes, it is not even desirable as it would slow every compilation process down.

To avoid printing the commands, you can use the -s (or --silent) option when calling make. But it will not prevent to have the output of the various compilations occurring in different processes to be interleaved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜