git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] make strip: include `scalar`
Date: Mon, 17 Nov 2025 14:04:43 -0800	[thread overview]
Message-ID: <xmqq7bvoiadg.fsf@gitster.g> (raw)
In-Reply-To: <pull.2004.git.1763409086322.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Mon, 17 Nov 2025 19:51:26 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> When Scalar was made a canonical part of Git in 7b5c93c6c68 (scalar:
> include in standard Git build & installation, 2022-09-02), it was added
> to all relevant Makefile targets except for the `strip` target.
>
> Let's correct that.

The motivation makes perfect sense.

> diff --git a/Makefile b/Makefile
> index 7e0f77e298..62f7f7bf56 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2565,7 +2565,7 @@ please_set_SHELL_PATH_to_a_more_modern_shell:
>  
>  shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
>  
> -strip: $(PROGRAMS) git$X
> +strip: $(PROGRAMS) git$X scalar$X
>  	$(STRIP) $(STRIP_OPTS) $^

I wonder why the original names git$X here explicitly, instead of
using say $(OTHER_PROGRAMS) that covers both of these.  I know that
the undocumented INCLUDE_DLLS_IN_ARTIFACTS knob uses OTHER_PROGRAMS
by throwing in non-programs like DLLs to it, so that artifacts-tar
target would include them, but perhaps instead of working around the
misdesign of that target, wouldn't it be better to correct its use
of OTHER_PROGRAMS and use it here instead?

The change (including the "strip scalar, too!" part) should look
like this, I think.

Also do we need a matching change to CMake and meson?

 Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git c/Makefile w/Makefile
index 70d1543b6b..a63a4adbc7 100644
--- c/Makefile
+++ w/Makefile
@@ -682,6 +682,7 @@ LIB_OBJS =
 LIBGIT_PUB_OBJS =
 SCALAR_OBJS =
 OBJECTS =
+OTHER_ARTIFACTS =
 OTHER_PROGRAMS =
 PROGRAM_OBJS =
 PROGRAMS =
@@ -2499,7 +2500,7 @@ please_set_SHELL_PATH_to_a_more_modern_shell:
 
 shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
 
-strip: $(PROGRAMS) git$X
+strip: $(PROGRAMS) $(OTHER_PROGRAMS)
 	$(STRIP) $(STRIP_OPTS) $^
 
 ### Target-specific flags and dependencies
@@ -3697,10 +3698,11 @@ rpm::
 .PHONY: rpm
 
 ifneq ($(INCLUDE_DLLS_IN_ARTIFACTS),)
-OTHER_PROGRAMS += $(shell echo *.dll t/helper/*.dll t/unit-tests/bin/*.dll)
+OTHER_ARTIFACTS += $(shell echo *.dll t/helper/*.dll t/unit-tests/bin/*.dll)
 endif
 
 artifacts-tar:: $(ALL_COMMANDS_TO_INSTALL) $(SCRIPT_LIB) $(OTHER_PROGRAMS) \
+		$(OTHER_ARTIFACTS) \
 		GIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \
 		$(UNIT_TEST_PROGS) $(CLAR_TEST_PROG) $(MOFILES)
 	$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \


  reply	other threads:[~2025-11-17 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 19:51 [PATCH] make strip: include `scalar` Johannes Schindelin via GitGitGadget
2025-11-17 22:04 ` Junio C Hamano [this message]
2025-11-25 17:47   ` Johannes Schindelin
2025-11-25 22:54     ` Junio C Hamano
2025-12-01  7:58       ` Patrick Steinhardt

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=xmqq7bvoiadg.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).