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

Re: [PATCH] Makefile: read configuration earlier

From
Jeff King <peff@peff.net>
Date
Jul 30, 2026, 11:57 UTC
Message-ID
<20260730115745.GB1871609@coredump.intra.peff.net>
In-Reply-To
<xmqqh5lhm82g.fsf@gitster.g>
On Wed, Jul 29, 2026 at 09:10:15PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> This is a scary patch because its correctness depends on what is
> between lines 780-1050.  It turns out that this now lets config.mak*
> to set quite a lot of symbols to affect the outcome:
> 
>  * PROGRAM_OBJS, BUILT_INS, TEST_BUILTIN_OBJS
>  * WITH_BREAKING_CHANGES
>  * SHELL_PATH
>  * PERL_PATH
>  * PYTHON_PATH
>  * NO_RUST
>  * DEBUG
>  * uname_S?????
>  * SPARSE_FLAGS
>  * SPATCH_INCLUDE_FLAGS

Yes, though to some degree config.mak can already manipulate those after the fact. There are other breakages, though (see the CFLAGS one I showed elsewhere in the thread).

Show 12 quoted lines
> Especially curious is that currently there is this bit:
> 
> 	ifeq ($(uname_S),Windows)
> 	RUST_LIB_NAME = gitcore.lib
> 	else
> 	RUST_LIB_NAME = libgitcore.a
> 	endif
> 
> that comes WAY BEFORE config.mak.uname is included.  If the location
> to include these files matter, then how could this bit have been
> working?  I have no idea and since I have no access to Windows
> development box so I wouldn't know.
Yeah, that seems totally wrong to me. Likewise this bit right above it:
  ifndef NO_RUST
  ifdef DEBUG
  RUST_BUILD_CONFIG = debug
  else
  RUST_BUILD_CONFIG = release
  endif

has the same problem brian is fixing for BREAKING_CHANGES. It will work for "make NO_RUST=1", but not if you put NO_RUST into config.mak. That said, I don't know why that NO_RUST check is there at all. It is not a problem to set a flag that nobody looks at. So it may be a bug without a visible effect. ;)

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 15 of 16 in “Failing tests with WITH_BREAKING_CHANGES”
  1. brian m. carlsonJul 28, 2026
  2. Junio C HamanoJul 28, 2026
  3. Phillip WoodJul 28, 2026
  4. Jeff KingJul 28, 2026
  5. 0/2 fix serial tests without/with breaking-changesJeff King, Jul 28, 2026
  6. 1/2 t0014: factor out choice of deprecated commandsJeff King, Jul 28, 2026
  7. Junio C HamanoJul 28, 2026
  8. 2/2 t0014: generate deprecated command names dynamicallyJeff King, Jul 28, 2026
  9. Junio C HamanoJul 28, 2026
  10. Jeff KingJul 28, 2026
  11. brian m. carlsonJul 28, 2026
  12. Phillip WoodJul 29, 2026
  13. Makefile: read configuration earlierbrian m. carlson, Jul 29, 2026
  14. Junio C HamanoJul 30, 2026
  15. Jeff KingJul 30, 2026
  16. Jeff KingJul 30, 2026

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.