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

[PATCH 1/2] make: add install-stripped target

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Aug 26, 2021, 11:38 UTC
Message-ID
<20210826113824.50078-2-bagasdotme@gmail.com>
In-Reply-To
<20210826113824.50078-1-bagasdotme@gmail.com>
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 <bagasdotme@gmail.com>
---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index d1feab008f..b8a3a64422 100644
--- a/Makefile
+++ b/Makefile
@@ -3102,7 +3102,12 @@ endif
 	done && \
 	./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
 
-.PHONY: install-gitweb install-doc install-man install-man-perl install-html install-info install-pdf
+install-stripped: install
+	for f in $(PROGRAMS) git$X; do \
+		find $$prefix -type f -name $$f -exec $(STRIP) $(STRIP_OPTS) {} \; ; \
+	done
+
+.PHONY: install-gitweb install-doc install-man install-man-perl install-html install-info install-pdf install-stripped
 .PHONY: quick-install-doc quick-install-man quick-install-html
 install-gitweb:
 	$(MAKE) -C gitweb install
-- 
2.25.1
Previous: Bagas SanjayaNext: Junio C Hamano
Message 2 of 8 in “make: install stripped Git”
  1. 0/2 make: install stripped GitBagas Sanjaya, Aug 26, 2021
  2. 1/2 make: add install-stripped targetBagas Sanjaya, Aug 26, 2021
  3. Junio C HamanoAug 26, 2021
  4. Bagas SanjayaAug 27, 2021
  5. Đoàn Trần Công DanhAug 27, 2021
  6. 2/2 make: delete strip targetBagas Sanjaya, Aug 26, 2021
  7. Ævar Arnfjörð BjarmasonAug 26, 2021
  8. Junio C HamanoAug 26, 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.