linux - Error while running parallel make -


consider following make:

all: b  a:         echo         exit 1   b:         echo b start         sleep 1         echo b end 

while running make -j2 receive following output:

echo echo b start exit 1 b start sleep 1 make: *** [a] error 1 make: *** waiting unfinished jobs.... echo b end b end 

we have quite big make file , it's easy miss error, since there's no error message @ end of execution.

is there way error message appear in end of make execution?

update:

see possible solution how check make exit status within make.

if program called make returns error, return code of make not zero. after calling make check return code see if error occurred. on bash (and many other shells zsh) following:

# make .... # echo $? 

the echo print 0 if ok , print else if wasn't.

you run check inside shell script:

make if [ $? -eq 0 ];     echo "everything ok" else     echo "something went wrong!" fi 

if need exact error message easiest way redirect output make file , grep error if execution failed.

but way run make in parallel , re-execute -j1 if went wrong clean error message. guess put shell script using technique above.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -