Somehow when a failure occurred during a parallel build the rule for .c.o was interrupted mid-step and left an empty .o: $ ll hist* 16 -rw-r--r-- 1 woods staff - 7671 Feb 23 18:59 hist.d 0 -rw-r--r-- 1 woods staff - 0 Feb 23 18:59 hist.o 456 -rw-r--r-- 1 woods staff - 229544 Feb 23 18:59 hist.o.o It would be my understanding that this should not be possible. The rule where this happened is of course this one: .c.o: ${COMPILE.c} ${.IMPSRC} ${OBJECT_TARGET} ${CTFCONVERT_RUN} Which basically expands to the following script cc host.c -o host.o.o ctfconvert -o host.o host.o.o && rm -f host.o.o Perhaps though there is a deeper problem with multi-step rules that generate temporary intermediate files? In jobs mode make is supposed to feed the whole rule's script to one invocation of a shell, and in theory that invocation should run to completion even if some other parallel branch of make encounters an error. So, can anyone explain better how this happened? (Probably this rule should be changed to have the ctfconvert only run if the compile succeeds, but that shouldn't affect the case I have discovered here.... Ideally maybe the ctfconvert should be on a pipeline so that there's no temporary intermediate file necessary, but that would be more involved given how CTFCONVERT is possibly not always defined.) -- Greg A. Woods <gwoods%acm.org@localhost> Kelowna, BC +1 250 762-7675 RoboHack <woods%robohack.ca@localhost> Planix, Inc. <woods%planix.com@localhost> Avoncote Farms <woods%avoncote.ca@localhost>
Attachment:
pgp4CGbbZzHM9.pgp
Description: OpenPGP Digital Signature