bug-make
[Top][All Lists]
Advanced

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

Re: Circular dependency with order-only dependencies


From: Paul Smith
Subject: Re: Circular dependency with order-only dependencies
Date: Wed, 23 Jan 2019 12:07:55 -0500

On Wed, 2019-01-23 at 18:35 +0200, Eli Zaretskii wrote:
> I was surprised to see it complain and drop the a.h <- b dependency,
> since it is an order-only dependency.  Is this a bug?  If not, what
> kind of problems can happen due to such "circular" dependencies?

I don't think it's a bug.

GNU make's internal dependency graph determines the order in which
targets are built.  It must be acyclical, otherwise make can never
choose which target to build before others.

In your example makefile you have a cycle:

  b -> t -> a.o -> a.h -,
  ^_____________________/

So make can never correctly choose which target to build first, without
breaking the cycle.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]