[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to force immediate evaluation of a variable
From: |
Paul D. Smith |
Subject: |
Re: how to force immediate evaluation of a variable |
Date: |
Wed, 24 Mar 2004 13:17:27 -0500 |
%% "Kris Thielemans" <address@hidden> writes:
kt> I'm getting into recursive makefiles, and in a few directories
kt> want to include a file that will do most of the tricks. That file
kt> looks for instance as follows
kt> --- clean.mk ---
kt> clean_$(dir):
kt> rm $(dir)*.o
This is what automatic variables are for. You should always use those
inside a command script when you want to refer to the target or
prerequisites.
For example:
clean_$(dir):
rm $(@:clean_%=%)
--
-------------------------------------------------------------------------------
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