2008/11/25 Philip Guenther <[EMAIL PROTECTED]>

> On Tue, Nov 25, 2008 at 6:16 AM, Herta Van den Eynde
> <[EMAIL PROTECTED]> wrote:
> > I have a makefile with multiple targets, some of which are prerequisites
> to
> > others, but whichever the user chooses to execute, I always want the
> > "cleanup" target to be triggered as the last set of actions.
> >
> > Is there any way to enforce that?
>
> Without altering the other targets in the makefile?  No.  It sounds
> like you're looking for the BSD make ".END" target, but GNU make
> doesn't have that.  The closest solution I see with GNU make would be
> to rename the makefile to "makefile.real" and then put this in
> "makefile":
>     all:
>             @$(MAKE) -f makefile.real $(MAKECMDGOALS); \
>                 ret=$$?; stuff-to-always-do-even-if-make-fails; exit $$ret
>             stuff-to-do-afterwards-on-success-only
>     .PHONY: all
>
> That, or fix this in the thing that calls make.
>
>
> Philip Guenther
>

Not the answer I was hoping for, but at least I know to stop looking.

Thanks, Philip.

Kind regards,

Herta

-- 
"Life on Earth may be expensive,
but it comes with a free ride around the Sun."
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to