[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Question] How can i stop build immediately in build fail?
From: |
Oleksandr Gavenko |
Subject: |
Re: [Question] How can i stop build immediately in build fail? |
Date: |
Fri, 11 Jan 2013 19:38:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
On 2013-01-10, jungsoo.son wrote:
> I always run 'make' with -j8. In this case, when there are a fail it is too
> hard to check the fail.
>
> I want to kill the all sub-make process immediately when the error occurred.
>
> How can i stop build immediately in build fail?
>
I make such example:
.PHONY: job
job: job1 job2
.PHONY: job1
job1:
sleep 3
exit 1
.PHONY: job2
job2:
while echo ok; do sleep 1; done
Ir you run like:
$ make -j2
you get:
sleep 3
while echo ok; do sleep 1; done
ok
ok
ok
exit 1
make: *** [job1] Error 1
make: *** Waiting for unfinished jobs....
ok
ok
...
Seems to be reasonable have an option to kill jobs after some timeout if one
job fail (or make receive signal) and enabling .DELETE_ON_ERROR in this
case...
--
Best regards!