All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: <git@vger.kernel.org>,  Jeff King <peff@peff.net>
Subject: Re: [PATCH] Makefile: read configuration earlier
Date: Wed, 29 Jul 2026 21:10:15 -0700	[thread overview]
Message-ID: <xmqqh5lhm82g.fsf@gitster.g> (raw)
In-Reply-To: <20260729225944.1364947-1-sandals@crustytoothpaste.net> (brian m. carlson's message of "Wed, 29 Jul 2026 22:59:44 +0000")

"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> When building with WITH_BREAKING_CHANGES, we need that option set before
> we generate the list of binaries to build, since it affects whether
> git-whatchanged is built.  That in turn, affects whether t1517 passes,
> since it does not if we are in breaking-changes mode and git-whatchanged
> or git-pack-redundant exist.  Load the configuration settings earlier in
> the Makefile so that we properly honor this value when building.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> I noticed that Peff's patches didn't quite fix the problem for me and I
> think we need this on top to make the tests pass properly.
>
>  Makefile | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

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

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.

> diff --git a/Makefile b/Makefile
> index 98e995e4be..6bfa461aeb 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -781,6 +781,10 @@ clean-perl-script:
>  clean-python-script:
>  	$(RM) $(SCRIPT_PYTHON_GEN)
>  
> +include config.mak.uname
> +-include config.mak.autogen
> +-include config.mak
> +
>  SCRIPTS = $(SCRIPT_SH_GEN) \
>  	  $(SCRIPT_PERL_GEN) \
>  	  $(SCRIPT_PYTHON_GEN) \
> @@ -1050,10 +1054,6 @@ GIT-SPATCH-DEFINES: FORCE
>  		echo "$$FLAGS" >GIT-SPATCH-DEFINES; \
>              fi
>  
> -include config.mak.uname
> --include config.mak.autogen
> --include config.mak
> -
>  ifdef DEVELOPER
>  include config.mak.dev
>  endif

  reply	other threads:[~2026-07-30  4:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  0:46 Failing tests with WITH_BREAKING_CHANGES brian m. carlson
2026-07-28  1:00 ` Junio C Hamano
2026-07-28 13:31 ` Phillip Wood
2026-07-28 13:55   ` Jeff King
2026-07-28 14:36     ` [PATCH 0/2] fix serial tests without/with breaking-changes Jeff King
2026-07-28 14:37       ` [PATCH 1/2] t0014: factor out choice of deprecated commands Jeff King
2026-07-28 15:57         ` Junio C Hamano
2026-07-28 14:38       ` [PATCH 2/2] t0014: generate deprecated command names dynamically Jeff King
2026-07-28 16:01         ` Junio C Hamano
2026-07-28 16:19           ` Jeff King
2026-07-28 21:12         ` brian m. carlson
2026-07-29 15:25     ` Failing tests with WITH_BREAKING_CHANGES Phillip Wood
2026-07-29 22:59     ` [PATCH] Makefile: read configuration earlier brian m. carlson
2026-07-30  4:10       ` Junio C Hamano [this message]
2026-07-30 11:57         ` Jeff King
2026-07-30 11:54       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh5lhm82g.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.