[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does (normal) prerequisite order matter?
From: |
Paul D. Smith |
Subject: |
Re: Does (normal) prerequisite order matter? |
Date: |
Mon, 21 Nov 2005 15:03:20 -0500 |
%% Boris Kolpackov <address@hidden> writes:
bk> "Paul D. Smith" <address@hidden> writes:
me> prereq2: | prereq1
>> This says "prereq1 must complete before prereq2 will be run, BUT the
>> decision on rebuilding prereq2 will completely ignore prereq1."
bk> It also says that if prereq2 is to be updated then prereq1 will be
bk> updated as well.
Not quite; I know what you meant but to be perfectly accurate, it says
that if prereq2 is to be updated then prereq1 will be _checked to see if
it needs to be updated_. If it doesn't, it won't be updated.
bk> This becomes important if we add target2 to the original makefile:
bk> target1: prereq1 prereq2
bk> target2: prereq2
bk> prereq2: | prereq1
bk> Now if you say 'make target2', prereq1 will be updated even though
bk> it's not needed.
Yes, good point.
--
-------------------------------------------------------------------------------
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