[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to invoke startup and cleanup rules?
From: |
Paul D. Smith |
Subject: |
Re: How to invoke startup and cleanup rules? |
Date: |
Fri, 29 Nov 2002 10:35:06 -0500 |
%% "Peter Ring" <address@hidden> writes:
pr> I'd like to have a startup rule invoked before any other rule, and
pr> a cleanup rule invoked just before make exits. Something similar
pr> to the BEGIN and END rules in awk; or something like constructors
pr> and destructors in an OO language. What would be the most simple
pr> and most robust way to accomplish this?
You can emulate a "begin" type rule with $(shell ...)
_foo := $(shell ...my commands...)
There is no simple way to do an "end" type rule. The best you can do is
use recursion, which is kind of messy.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist