[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recursive dependencies
From: |
Paul D. Smith |
Subject: |
Re: Recursive dependencies |
Date: |
Fri, 31 Mar 2006 10:18:38 -0500 |
%% Rodrigo de Salvo Braz <address@hidden> writes:
rdsb> Suppose I have a Makefile for project A which calls a recursive
rdsb> make for project B.
rdsb> I want to *always* run the Makefile for B, so its dependencies
rdsb> are checked and B is remade when necessary. This suggests a
rdsb> phony target for it:
rdsb> A: B
rdsb> <commands for making A>
rdsb> .PHONY: B
rdsb> B:
rdsb> $(MAKE) -C bdir
rdsb> But then A is always remade regardless of B having changed or
rdsb> not.
rdsb> Could someone please suggest a solution to this problem? Please
rdsb> note I am not subscribed to the list, so please cc me.
If you're running a sufficiently new version of GNU make you can use
order-only prerequisites for this.
See the GNU make manual for full details.
Cheers!
--
-------------------------------------------------------------------------------
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