Unix Programming - Re: How to execute commands in case of interruption of makefile

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > December 2006 > Re: How to execute commands in case of interruption of makefile





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2006-12-26, 7:20 pm

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.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com