[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Choosing between several rules for a single targed based on prerequi
From: |
Paul D. Smith |
Subject: |
Re: Choosing between several rules for a single targed based on prerequisites avaibility |
Date: |
Tue, 7 Jun 2005 23:59:40 -0400 |
%% Yannick Patois <address@hidden> writes:
yp> I have a target (A) that can be build either by applying a given rule on
yp> a prerequisites (P1) or another rule on another prerequisites (P2).
yp> I would like a Makefile that does:
yp> - If only one of P1 or P2 exists, use the available rule to build it
yp> - If both exists, use P1
yp> Is there a way to say that in a Makefile?
yp> I couldnt find anything about this.
If you can write it as a pattern rule (or two pattern rules, really)
then it will work exactly as you expect.
--
-------------------------------------------------------------------------------
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