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

Re: [PATCH RESEND v2] make: add install-stripped target

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 31, 2021, 17:06 UTC
Message-ID
<xmqq8s0hwnkm.fsf@gitster.g>
In-Reply-To
<20210831013235.388682-1-bagasdotme@gmail.com>
Bagas Sanjaya <bagasdotme@gmail.com> writes:
> Add the target that install Git with stripped executables.
> ...
> +
> +install-stripped: INSTALL_OPTS = -s --strip-program=$(STRIP)
Not everybody's $(INSTALL) supports --strip-program, does it?  

FreeBSD seems to lack the option, and instead uses the $STRIPBIN environment variable to specify which program to use.

The manual page for macOS [*] does not mention --strip-program or STRIPBIN.

If the user leaves STRIP as the default (i.e. strip), this target fails, not because the user does not have 'strip', but because the 'install' used by the user does not know the --strip-program option, even though there is no need to use the option in such a case.

Given that, I am not sure if we really want "install-stripped" target. Adding INSTALL_OPTS make variable that defaults to an empty string is a good idea, but we probably can and should stop there.

Then users can do any of the following:
	$ make INSTALL_OPTS=-s install
	$ STRIPBIN=my-strip make INSTALL_OPTS=-s install

depending on their system, which sounds sufficient, and is a vast improvement over the current

	$ make ; make strip ; make install 
I would think.
[Reference]
* https://opensource.apple.com/source/file_cmds/file_cmds-321.40.3/install/install.1.auto.html
Previous: Bagas SanjayaNext: Bagas Sanjaya
Message 2 of 4 in “make: add install-stripped target”
  1. make: add install-stripped targetBagas Sanjaya, Aug 31, 2021
  2. Junio C HamanoAug 31, 2021
  3. Bagas SanjayaSep 1, 2021
  4. Junio C HamanoSep 1, 2021

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.