Hi all, The attached Makefile causes an infinite loop with parallel make when using make 3.81 (on amd64/Linux):
$ make setup touch B.hs A.hs sleep 2 touch B.hi B.dyn_hi sleep 2 touch B.o B.dyn_o sleep 2 touch A.dyn_hi sleep 2 touch A.o A.dyn_o $ make so true 1 B.hi B.o false 1 make: *** [so] Error 1 $ make so -j2 true 1 B.hi B.o [doesn't terminate] I can't reproduce it with 3.82, but I don't know for sure whether it's fixed or whether it's just luck that it doesn't get tickled. However, even if it is fixed in 3.82, that doesn't really help me right now as I would really like my build system to work with the make that people have installed, and 3.81 is still very common. Is anyone able to explain what causes the bug, so that I can try to alter the build system to avoid it, please? Also, is there a way to tell make not to treat any file as intermediate? I think that it's possible that this would work around the problem. If that's not possible, then if I can make a list of all files that the build system might build then adding list of all files : | exists exists: touch $@ would do it, right? Although then, if the build system didn't actually find a rule for a file in the list, then the dependency on exists would make it think that it could build it; is there any way to avoid that? Thanks Ian
setup: touch B.hs A.hs sleep 2 touch B.hi B.dyn_hi sleep 2 touch B.o B.dyn_o sleep 2 touch A.dyn_hi sleep 2 touch A.o A.dyn_o A.o: B.hi %.hi : %.o %.hs true 1 $@ $< %.dyn_o: %.hi true 2 $@ $< %.dyn_hi : %.dyn_o %.hs true u $@ $< so : A.dyn_o false 1
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make