bug-make
[Top][All Lists]
Advanced

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

Circular dependency with order-only dependencies


From: Eli Zaretskii
Subject: Circular dependency with order-only dependencies
Date: Wed, 23 Jan 2019 18:35:06 +0200

The following short Makefile:

 all: b

 a.o: a.h
         touch a.o

 a.h: foo | b
         touch a.h

 t: a.o
         touch t

 b: t
         touch b

followed by these commands:

 touch foo
 make

produces:

 make: Circular a.h <- b dependency dropped.
 touch a.h
 touch a.o
 touch t
 touch b

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?

(The real use case is much more painful, because it causes Make to
drop an important dependency, and one of the files is not remade when
it should be.)



reply via email to

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