Subject: Re: [PATCH] t/README: mention test files are make targets

From: Junio C Hamano <[email-masked]>
Date: Mon, 25 Mar 2024 12:01:44 -0700

Chris Torek <[email-masked]> writes:

> On Mon, Mar 25, 2024 at 2:49 AM Junio C Hamano <[email-masked]> wrote:
>> As long as we do not use these $(T) files as an input to some other
>> thing and list them as the dependencies, we are OK, though.
>
> You could (maybe later / at need) stop listing them as `.PHONY` and
> instead use:
>
>     $(T)::
>         sh -c ./$@
>
> or similar, so that some $(T) *can* be an input. Note that this requires
> using double-colon rules earlier to build the test.
>
> I wouldn't do this without a pretty strong reason though.

Me neither.

I personally think a target that is marked as .PHONY and does not
use double-colon rule is a bug by itself but that is a separate
story.

In any case, just to avoid leaving the thread hanging, I'll take the
patch as is, as it documents a useful trick in the status quo.

Thanks, all.