On Wed, 12 Jul 2000, Paul D. Smith wrote:

> Not in the makefile you sent in your message.  There's a target %.gif
> that can be built from %.ppm, but there's no implicit rule that shows
> how to build anything (including %.ppm) from %.gif.
> 
> Either you overlooked it, or the makefile I received got truncated
> somehow.

Ooops!

>   ch> Anyway, yes, perhaps I'm stretching 'make' too far, but I'm strongly
>   ch> encouraged by the fact that this works some of the time!
> 
>   >> As far as I can tell, make works all the time when it should work.
>   >> What is broken is that in some situations where make can't do what
>   >> you want, it will try to do something bogus instead of just
>   >> printing an error.
> 
>   >> Am I correct here, or am I missing something?
> 
>   ch> It's actually doing the right thing about half the time.  I guess the
>   ch> code determining which dependency to drop is picking an arbitrary
>   ch> dependency, instead of useless dependencies.
> 
> It's not clear how make would determine "useless".  What I would assume
> is that make would pick the last dependency that caused the loop, and
> throw it out.

Yes, that's exactly it.  If adding a dependency to the graph would
form a loop, don't add the dependency.  The result will be a tree.

It's like flood-filling a region in computer graphics; if the program
didn't turn a very loopy graph into a tree, it would be stuck in an
infinite loop, painting the same pixels over and over again.

--
Charles Howes -- [EMAIL PROTECTED]

Reply via email to