This two-patch series adds convenient make target to install Git with
stripped executables (programs). The first patch adds such target
(called install-stripped), while the second one deletes the
now-redundant strip target.
Unlike previous attempts [1] and [2], stripping is done after installing
Git into installation prefix, without touching working directory where
Git is compiled. The advantage of it is unstripped programs can be
installed at the same prefix (thus overwriting already installed
stripped ones), particularly useful for debugging and development
purposes.
[1]:
https://lore.kernel.org/git/20210820105052.30631-1-bagasdotme@gmail.com/
[2]:
https://lore.kernel.org/git/20210817110728.55842-1-bagasdotme@gmail.com/
Bagas Sanjaya (2):
make: add install-stripped target
make: delete strip target
Makefile | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
base-commit: c4203212e360b25a1c69467b5a8437d45a373cac
--
2.25.1
Add the target that install Git with stripped executables
The executables that are going to be stripped are all of $(PROGRAMS) and
git. Because they are installed over various directories (bin and
libexec/git-core) within installation prefix, the location of each
program needs to be found and pass it to $(STRIP) program.
Signed-off-by: Bagas Sanjaya <redacted>
---
Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -2170,8 +2170,6 @@ 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)$(STRIP_OPTS)$^### Flags affecting all rules
This doesn't remove the phony "strip" target (nor does the first patch),
and in any case I think this would be more readable with the two patches
squashed together. Let's remove the old target & add the new one
atomically.