Subject: Re: [PATCH v3] make: add INSTALL_STRIP option variable

From: Junio C Hamano <[email-masked]>
Date: Thu, 16 Sep 2021 12:23:49 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> I think the suggestion in
> https://lore.kernel.org/git/[email-masked]/ is to make this
> a boolean variable, and in any case I think that makes more sense here,

I do not think I ever suggested to use a boolean in that message nor
in the other message in thread.  A boolean may convey the wish of
the users to cause the binaries installed in a stripped form, but
does not allow them to express how to do so on their particular
platform (e.g. where is "strip" installed? how to tell "install"
to strip?).

> since....
> ...
> ...this really is not an INSTALL_STRIP but (using some combination of
> your own naming) a "INSTALL_XPROGRAMS_OPTS" or "INSTALL_XOPTS". I.e. you
> can supply arbitrary options to "install" with this, but only for
> binaries.

INSTALL_STRIP_OPTS is a perfectly fine name for this thing.  

It should not say XPROGRAMS but should say STRIP to express the
intent, i.e. why we have it, not what we do with it.  The fact that
it wants to apply to binaries and not to scripts is an
implementation detail.

Of course, when you want to "affect" only binaries but not scripts,
even if the effect you are trying to cause on them is _not_ "strip",
you could abuse the option, but the name must make it clear that
such a use is an abuse.  By naming the variable with STRIP in its
name, we reserve the right to change to which instance of $(INSTALL)
the option is applied to to better implement the goal to "strip
while installing", which might not be a simple "binaries get it,
scripts don't" we currently have, and it will be clear to those who
have been abusing the option to affect "only binaries and not
scripts" that they have no right to complain.

HTH.