osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: Make -k option... - msg#00032

List: help-make-gnu

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

Do you really think I would send out something untested? Did you try
the actual sample I sent? How does it work?

On Fri, Sep 9, 2011 at 5:32 PM, Danny Barraza <danny.barraza@xxxxxxxxxx> wrote:
> Hey David, thanks for the response, but no dice...didn't work...any other
> ideas...
>
> here some output...
>
> Stopping make fatal error occurred. kill -INT 2830
> .....make still keeps going....
>
> thanks,
> Danny
>
>
> On 9/9/2011 1:45 PM, David Boyce wrote:
>>
>> Here's one idea:
>>
>> % cat makefile
>> .PHONY: all t1 t2 t3 t4
>>
>> MAKE_PID := $(shell perl -le 'print getppid()')
>> define Abort
>> kill -INT $(MAKE_PID)
>> endef
>>
>> all: t1 t2 t3 t4
>>
>> t1 t2 t4:
>>         @echo making $@
>>
>> t3:
>>         @echo making $@
>>         cat food || $(call Abort)
>>
>>
>> % make -k
>> making t1
>> making t2
>> making t3
>> cat food || kill -INT 25684
>> cat: cannot open food
>>
>>
>> On Fri, Sep 9, 2011 at 1:29 PM, Danny Barraza<danny.barraza@xxxxxxxxxx>
>>  wrote:
>>>
>>> To all the smart gnu make people...I have a bit of a deli ma...please
>>> read
>>> the thread below for the problem...thank you all...
>>>
>>> Sample code:
>>>
>>> Sample code:
>>>
>>> run_script:
>>>        @$(ECHO)
>>>        @$(PRINTF) "Running chkswhw script."
>>>        @$(ECHO)
>>>        @$(PRINTF) "Validation of H/W and S/W Infra components."
>>>        @$(ECHO)
>>>        @chkswhw ; \
>>>        if [ $$? -eq 0 ] ; then         \
>>>        echo chkswhw exited successfully...;          \
>>>        else            \
>>>        $(error Fatal error has occurred stopping Make...);         \
>>>        fi
>>>
>>> Danny
>>>
>>> -------- Original Message --------
>>> Subject:        Re: Make -k option...
>>> Date:   Fri, 09 Sep 2011 10:08:08 +0300
>>> From:   Eli Zaretskii<eliz@xxxxxxx>
>>> Reply-To:       Eli Zaretskii<eliz@xxxxxxx>
>>> To:     Danny Barraza<danny.barraza@xxxxxxxxxx>
>>>
>>>
>>>
>>>>  Date: Thu, 08 Sep 2011 16:43:51 -0700
>>>>  From: Danny Barraza<danny.barraza@xxxxxxxxxx>
>>>>
>>>>  Hi Eli, it's Danny once again...also thanks for all your help on the
>>>>  previous question.  I have another one.  I'm trying to Exit out of Make
>>>>  if my return code from a command is non-zero, but there's one catch I
>>>>  start make with the following: "make -k all" -k option suppresses all
>>>>  errors.  How can I force make to STOP, but the -k option needs to be
>>>>  there.  I tried using the error control function but that stops make no
>>>>  mater what the exit code is 0,1,2..., anyway need some help here.
>>>
>>> I can think of no way to do that if you use "make -k".  But I suggest
>>> to ask this question on make-help@xxxxxxx, the smart people out there
>>> will probably find some inventive way.
>>>
>>> _______________________________________________
>>> Help-make mailing list
>>> Help-make@xxxxxxx
>>> https://lists.gnu.org/mailman/listinfo/help-make
>>>
>

_______________________________________________
Help-make mailing list
Help-make@xxxxxxx
https://lists.gnu.org/mailman/listinfo/help-make

Thread at a glance:

Previous Message by Date:

Re: Re: Make -k option...

Here's one idea: % cat makefile .PHONY: all t1 t2 t3 t4 MAKE_PID := $(shell perl -le 'print getppid()') define Abort kill -INT $(MAKE_PID) endef all: t1 t2 t3 t4 t1 t2 t4: @echo making $@ t3: @echo making $@ cat food || $(call Abort) % make -k making t1 making t2 making t3 cat food || kill -INT 25684 cat: cannot open food On Fri, Sep 9, 2011 at 1:29 PM, Danny Barraza <danny.barraza@xxxxxxxxxx> wrote: > To all the smart gnu make people...I have a bit of a deli ma...please read > the thread below for the problem...thank you all... > > Sample code: > > Sample code: > > run_script: >        @$(ECHO) >        @$(PRINTF) "Running chkswhw script." >        @$(ECHO) >        @$(PRINTF) "Validation of H/W and S/W Infra components." >        @$(ECHO) >        @chkswhw ; \ >        if [ $$? -eq 0 ] ; then         \ >        echo chkswhw exited successfully...;          \ >        else            \ >        $(error Fatal error has occurred stopping Make...);         \ >        fi > > Danny > > -------- Original Message -------- > Subject:        Re: Make -k option... > Date:   Fri, 09 Sep 2011 10:08:08 +0300 > From:   Eli Zaretskii <eliz@xxxxxxx> > Reply-To:       Eli Zaretskii <eliz@xxxxxxx> > To:     Danny Barraza <danny.barraza@xxxxxxxxxx> > > > >>  Date: Thu, 08 Sep 2011 16:43:51 -0700 >>  From: Danny Barraza<danny.barraza@xxxxxxxxxx> >> >>  Hi Eli, it's Danny once again...also thanks for all your help on the >>  previous question.  I have another one.  I'm trying to Exit out of Make >>  if my return code from a command is non-zero, but there's one catch I >>  start make with the following: "make -k all" -k option suppresses all >>  errors.  How can I force make to STOP, but the -k option needs to be >>  there.  I tried using the error control function but that stops make no >>  mater what the exit code is 0,1,2..., anyway need some help here. > > I can think of no way to do that if you use "make -k".  But I suggest > to ask this question on make-help@xxxxxxx, the smart people out there > will probably find some inventive way. > > _______________________________________________ > Help-make mailing list > Help-make@xxxxxxx > https://lists.gnu.org/mailman/listinfo/help-make > _______________________________________________ Help-make mailing list Help-make@xxxxxxx https://lists.gnu.org/mailman/listinfo/help-make

Next Message by Date:

Re: Make -k option...

Does this help? It is a --keep-going-count=N option https://lists.gnu.org/archive/html/bug-make/2009-01/msg00035.html When using -j N, it kills all unfinished jobs as soon as N jobs have failed. Martin _______________________________________________ Help-make mailing list Help-make@xxxxxxx https://lists.gnu.org/mailman/listinfo/help-make

Previous Message by Thread:

Re: Re: Make -k option...

Here's one idea: % cat makefile .PHONY: all t1 t2 t3 t4 MAKE_PID := $(shell perl -le 'print getppid()') define Abort kill -INT $(MAKE_PID) endef all: t1 t2 t3 t4 t1 t2 t4: @echo making $@ t3: @echo making $@ cat food || $(call Abort) % make -k making t1 making t2 making t3 cat food || kill -INT 25684 cat: cannot open food On Fri, Sep 9, 2011 at 1:29 PM, Danny Barraza <danny.barraza@xxxxxxxxxx> wrote: > To all the smart gnu make people...I have a bit of a deli ma...please read > the thread below for the problem...thank you all... > > Sample code: > > Sample code: > > run_script: >        @$(ECHO) >        @$(PRINTF) "Running chkswhw script." >        @$(ECHO) >        @$(PRINTF) "Validation of H/W and S/W Infra components." >        @$(ECHO) >        @chkswhw ; \ >        if [ $$? -eq 0 ] ; then         \ >        echo chkswhw exited successfully...;          \ >        else            \ >        $(error Fatal error has occurred stopping Make...);         \ >        fi > > Danny > > -------- Original Message -------- > Subject:        Re: Make -k option... > Date:   Fri, 09 Sep 2011 10:08:08 +0300 > From:   Eli Zaretskii <eliz@xxxxxxx> > Reply-To:       Eli Zaretskii <eliz@xxxxxxx> > To:     Danny Barraza <danny.barraza@xxxxxxxxxx> > > > >>  Date: Thu, 08 Sep 2011 16:43:51 -0700 >>  From: Danny Barraza<danny.barraza@xxxxxxxxxx> >> >>  Hi Eli, it's Danny once again...also thanks for all your help on the >>  previous question.  I have another one.  I'm trying to Exit out of Make >>  if my return code from a command is non-zero, but there's one catch I >>  start make with the following: "make -k all" -k option suppresses all >>  errors.  How can I force make to STOP, but the -k option needs to be >>  there.  I tried using the error control function but that stops make no >>  mater what the exit code is 0,1,2..., anyway need some help here. > > I can think of no way to do that if you use "make -k".  But I suggest > to ask this question on make-help@xxxxxxx, the smart people out there > will probably find some inventive way. > > _______________________________________________ > Help-make mailing list > Help-make@xxxxxxx > https://lists.gnu.org/mailman/listinfo/help-make > _______________________________________________ Help-make mailing list Help-make@xxxxxxx https://lists.gnu.org/mailman/listinfo/help-make

Next Message by Thread:

Re: Make -k option...

Does this help? It is a --keep-going-count=N option https://lists.gnu.org/archive/html/bug-make/2009-01/msg00035.html When using -j N, it kills all unfinished jobs as soon as N jobs have failed. Martin _______________________________________________ Help-make mailing list Help-make@xxxxxxx https://lists.gnu.org/mailman/listinfo/help-make
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!