Unix Programming - Make dependency order and .INTERMEDIATE

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2005 > Make dependency order and .INTERMEDIATE





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Make dependency order and .INTERMEDIATE
Richard.Puchmayer@nautronix.com.au

2005-07-21, 2:52 am

Hi,

I've got a quick question.

Here's my makefile:

-----------------------------------
..PHONY: a b c Makefile foo

..INTERMEDIATE: a

foo: a b c

a:
echo "done a"

b:
echo "Done b"

c:
echo "Done c"
------------------------------------

The .PHONY is only there to shortcut a lot of implicit searches (keeps
-d short).
Now, I *expect* make to build the dependencies in the order stated, ie,
a, then b,
then c.

However, beacuse I've got the '.INTERMEDIATE: a' in there is does it in
the order:
b, then c, then a.

Why does the order change?

Cheers,
RiP

----
Richard Puchmayer
Richard.Puchmayer@nautronix.com.au
Perth, WA, Australia

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com