Subject: Re: [PATCH] fix parallel make problem

From: Junio C Hamano <[email-masked]>
Date: Fri, 31 Aug 2007 01:36:26 -0700

"Michael S. Tsirkin" <[email-masked]> writes:

>> Quoting Junio C Hamano <[email-masked]>:
>> Subject: Re: [PATCH] fix parallel make problem
>> 
>> "Michael S. Tsirkin" <[email-masked]> writes:
>> 
>> >> +.PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
>> >> +
>> >>  test-%$X: test-%.o $(GITLIBS)
>> >>  	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
>> >
>> > Add a comment here?
>> 
>> I did not see a particular need for that.  What would you say
>> there?
>
> That it's a work-around for make bug.

I would agree it is a make bug to barf like what we saw.  Even
though we allowed it to treat test-%.o files as intermediate
products and allowed them to be removed, it is not a good excuse
for make to forget rebuilding them.

But I also happen to think not marking test-%.o as precious was
a bug on our side.  We would want to keep the build by-product
to avoid recompilation, don't we?  And this additional line is
primarily about fixing that bug, which works the bug around as a
side effect.

> So how did this end up in your mail?

Because it is not a format-patch output.

I often run "git diff --stat -p HEAD" from inside MUA in order
to get the patch from my work tree, write a proposed commit
message, and then reset the change away without committing after
sending that message (yes I do not need "git stash" --- gmane
and vger are my stashes, Mwhhhaaaa).