[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Pattern rule prereqs are variables with % in them
From: |
Paul D. Smith |
Subject: |
RE: Pattern rule prereqs are variables with % in them |
Date: |
Tue, 6 Sep 2005 14:01:09 -0400 |
%% "Boucher, Jean" <address@hidden> writes:
bj> %.lib: $(%.lib_objs) $(%.lib_libs)
bj> @echo 'Hit .lib .lib_objs pattern rule for $@, prereqs=$^';\
You can't do this.
Variable and function references in target and prerequisite lists are
expanded immediately when the makefile is read in.
The "%" in patterns is not filled in until later, when make is trying to
find a rule to build a target.
So, these references to variables '%.lib_objs' and '%.lib_libs' are
expanding to the empty string.
--
-------------------------------------------------------------------------------
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
RE: Pattern rule prereqs are variables with % in them, Boucher, Jean, 2005/09/07