> Date: Thu, 21 Oct 2010 15:04:20 -0400 > From: Mike Shal <mar...@gmail.com> > Cc: Bug-make@gnu.org > > I don't see why Michael's example should fail, but I can reproduce the > behavior with 3.81 and 3.82.
It fails because, depending on the timing, app1.o may or may not exist when Make comes to check it. Here's the relevant portion of "make -d" output: - Considering target file `app1.o'. - Still updating file `app1.o'. Finished prerequisites of target file `app1'. The prerequisites of `app1' are being made. -Live child 0x652d40 (lib.a) PID 1894 -Live child 0x651590 (app1.o) PID 1893 -Reaping winning child 0x652d40 PID 1894 -Removing child 0x652d40 PID 1894 from chain. -Released token for child 0x652d40 (lib.a). -Live child 0x651590 (app1.o) PID 1893 +Live child 0x652d60 (lib.a) PID 1948 +Reaping winning child 0x652d60 PID 1948 +Removing child 0x652d60 PID 1948 from chain. Considering target file `app1'. Considering target file `app1.c'. File `app1.c' was considered already. Considering target file `lib.a'. File `lib.a' was considered already. - Considering target file `app1.o'. - Still updating file `app1.o'. - Finished prerequisites of target file `app1'. -The prerequisites of `app1' are being made. -Live child 0x651590 (app1.o) PID 1893 -Reaping winning child 0x651590 PID 1893 -Removing child 0x651590 PID 1893 from chain. -Considering target file `app1'. - Considering target file `lib.a'. - File `lib.a' was considered already. - Considering target file `app1.o'. - File `app1.o' was considered already. + Pruning file `app1.o'. Finished prerequisites of target file `app1'. - Prerequisite `app1.o' is newer than target `app1'. <<<<<<<<<<<< + Prerequisite `app1.o' of target `app1' does not exist. <<<<<<<<<<<< I think Make doesn't really use the rule that was supposed to be used to rebuild app1. It uses some builtin rule instead. To see that, try "make -j2 -r", and you will see this (remember: app1.o does not exist at this point): Updating goal targets.... Considering target file `app1'. Looking for an implicit rule for `app1'. Trying pattern rule with stem `1'. Trying implicit prerequisite `app1.o'. Trying pattern rule with stem `1'. Trying implicit prerequisite `app1.o'. Looking for a rule with intermediate file `app1.o'. Avoiding implicit rule recursion. Trying pattern rule with stem `app1'. Trying implicit prerequisite `src/app1.c'. Trying pattern rule with stem `app1'. Trying implicit prerequisite `src/app1.c'. Looking for a rule with intermediate file `src/app1.c'. Avoiding implicit rule recursion. Avoiding implicit rule recursion. No implicit rule found for `app1'. <<<<<<<<<<<<<<< Finished prerequisites of target file `app1'. No need to remake target `app1'. <<<<<<<<<<<<<<< make: Nothing to be done for `app1'. As you see, either it doesn't realize that app1 depends on lib.a, or that lib.a depends on lib.h via a.o and b.o. _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make