tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make .ORDER



On Sat, Jan 26, 2013 at 05:37:32PM +0000, Christos Zoulas wrote:
 > In article <20130126161446.GE1037%trav.math.uni-bonn.de@localhost>,
 > Edgar Fuß  <ef%math.uni-bonn.de@localhost> wrote:
 > >> In a non-parallel make it's sufficient to write
 > >> 
 > >>    X: A B
 > >> 
 > >> and it will always do A before B.
 > >Ah, I see. Is that traditional behaviour or guaranteed?

Traditionally guaranteed :-)

In traditional make, the right hand sides of rules are processed in
order. Parallel make chucked that principle for obvious reasons.

 > >And what if I write
 > >
 > >.ORDER A B
 > >
 > >X: B A
 > 
 > Try it:
 > 
 > .ORDER: A B
 > 
 > X: B A
 >      echo ${.TARGET}
 > A:
 >      echo ${.TARGET}
 > B:
 >      echo ${.TARGET}
 > 
 > What do you think it should print?

Not what it does:

% make -j1
`B' was not built (made 1, flags 2009, type 3000001)!
    `B' has .ORDER dependency against A (made 0, flags 9, type b000001)
`A' was not built (made 0, flags 2009, type b000001)!
Exit 1
% 

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index