git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2024, 19:01 UTC
Message-ID
<xmqqsf0ejftz.fsf@gitster.g>
In-Reply-To
<CAPx1GvcPEeC3HTdb4bUYASz-t=a7Z2MEUamB4QyO44y4MRy6Pw@mail.gmail.com>
Chris Torek <chris.torek@gmail.com> writes:
Show 14 quoted lines
> On Mon, Mar 25, 2024 at 2:49 AM Junio C Hamano <gitster@pobox.com> 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.
Previous: Chris Torek
Message 6 of 6 in “t/README: mention test files are make targets”
  1. t/README: mention test files are make targetsPhilippe Blain via GitGitGadget, Mar 24, 2024
  2. Junio C HamanoMar 24, 2024
  3. Philippe BlainMar 24, 2024
  4. Junio C HamanoMar 25, 2024
  5. Chris TorekMar 25, 2024
  6. Junio C HamanoMar 25, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.