Re: How to execute commands in case of interruption of makefile
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: How to execute commands in case of interruption of makefile




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: How to execute commands in case of interruption of makefile  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-27-06 12:20 AM

wyse03br@yahoo.com.br writes:

[Please do not top-post. Rest of the message re-ordered]

> toby wrote: 

This will execute do_on_failure on *any* failure;
the OP wanted to execute cleanup only on interruption.

It may or may not make sense to cleanup on other failures (perhaps
further investigation of why make failed in non-interrupted case
requires intermediate results).
[vbcol=seagreen]
> Unfortunately I can't add the wrapper, the Makefile is called from a
> monolithic application.

You sure can:

all:
bash -c "trap 'clean-up' INT TERM ; $(MAKE) $(MFLAGS) target_with_cleanup"

target_with_cleanup: dependencies
whatever ...

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:07 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register