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.)

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to