git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: git@vger.kernel.org, "Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	felipe.contreras@gmail.com,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH RESEND v2] make: add install-stripped target
Date: Tue, 31 Aug 2021 10:06:49 -0700	[thread overview]
Message-ID: <xmqq8s0hwnkm.fsf@gitster.g> (raw)
In-Reply-To: <20210831013235.388682-1-bagasdotme@gmail.com> (Bagas Sanjaya's message of "Tue, 31 Aug 2021 08:32:36 +0700")

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

  reply	other threads:[~2021-08-31 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  1:32 [PATCH RESEND v2] make: add install-stripped target Bagas Sanjaya
2021-08-31 17:06 ` Junio C Hamano [this message]
2021-09-01 11:31   ` Bagas Sanjaya
2021-09-01 17:15     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqq8s0hwnkm.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=bagasdotme@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).