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

Re: [PATCH v2 0/3] some unit-test Makefile polishing

From
Jeff King <peff@peff.net>
Date
Feb 4, 2024, 04:41 UTC
Message-ID
<20240204044104.GA295803@coredump.intra.peff.net>
In-Reply-To
<xmqqjznmtjr9.fsf@gitster.g>
On Fri, Feb 02, 2024 at 05:32:42PM -0800, Junio C Hamano wrote:
Show 25 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > The line 753 of that file (as can be seen at
> > https://github.com/git/git/blob/38aa6559b0c513d755d6d5ccf32414ed63754726/config.mak.uname#L753)
> 
> Ouch.  When it is laid out like this it is very obvious why this is
> broken, and what its workaround should be.
> 
> Thanks.  Let's queue this on top.
> 
> ------- >8 ------------- >8 ------------- >8 ------------- >8 -------
> Subject: [PATCH] t/Makefile: say the default target upfront
> 
> Similar to how 2731d048 (Makefile: say the default target upfront.,
> 2005-12-01) added the default target to the very beginning of the
> main Makefile to prevent a random rule that happens to be defined
> first in an included makefile fragments from becoming the default
> target, protect this Makefile the same way.
> 
> This started to matter as we started to include config.mak.uname
> and that included makefile fragment does more than defining Make
> macros, unfortunately.
> 
> Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thanks both of you for identifying and fixing this. I should have been able to catch this, as it triggers with a simple "make" in the t/ directory (rather than "make prove" or "make unit-test", which is of course what I checked).

Sorry I'm slow to chime in; I've been offline all week (and probably will be for another few days) due to a family emergency. But hopefully with this fix the topic is OK now.

-Peff
Previous: Junio C Hamano
Message 24 of 24 in “some unit-test Makefile polishing”
  1. 0/2 some unit-test Makefile polishingJeff King, Jan 29, 2024
  2. 1/2 Makefile: use order-only prereq for UNIT_TEST_BINJeff King, Jan 29, 2024
  3. SZEDER GáborJan 29, 2024
  4. Junio C HamanoJan 29, 2024
  5. Jeff KingJan 30, 2024
  6. 2/2 t/Makefile: get UNIT_TESTS list from C sourcesJeff King, Jan 29, 2024
  7. Patrick SteinhardtJan 29, 2024
  8. Jeff KingJan 29, 2024
  9. Adam DinwoodieJan 29, 2024
  10. Junio C HamanoJan 30, 2024
  11. Jeff KingJan 30, 2024
  12. Adam DinwoodieJan 31, 2024
  13. Jeff KingJan 30, 2024
  14. Junio C HamanoJan 29, 2024
  15. 0/3 some unit-test Makefile polishingJeff King, Jan 30, 2024
  16. 1/3 Makefile: use mkdir_p_parent_template for UNIT_TEST_BINJeff King, Jan 30, 2024
  17. 2/3 Makefile: remove UNIT_TEST_BIN directory with "make clean"Jeff King, Jan 30, 2024
  18. 3/3 t/Makefile: get UNIT_TESTS list from C sourcesJeff King, Jan 30, 2024
  19. Junio C HamanoJan 31, 2024
  20. Phillip WoodFeb 1, 2024
  21. Junio C HamanoFeb 2, 2024
  22. Johannes SchindelinFeb 2, 2024
  23. Junio C HamanoFeb 3, 2024
  24. Jeff KingFeb 4, 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.