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

[PATCH v2] Makefile: error out invoking strip target

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Nov 25, 2021, 12:26 UTC
Message-ID
<20211125122607.26602-1-bagasdotme@gmail.com>

Now that $INSTALL_STRIP variable can be defined since 3231f41009 (make: add INSTALL_STRIP option variable, 2021-09-05), it is redundant to have 'strip' target when $INSTALL_STRIP does the job. Error out when invoking the target so that users are forced to define the variable instead.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Changes since v1 [1]:
   - use $(error) function (suggested by Ævar)
   - message rewording (suggested by Ævar)
 [1]:
https://lore.kernel.org/git/211123.86a6hvuikj.gmgdl@evledraar.gmail.com/T/#u
 Makefile | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 12be39ac49..d569b5cba8 100644
--- a/Makefile
+++ b/Makefile
@@ -2159,6 +2159,9 @@ 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
+	$(error You are about to install stripped Git binaries using 'strip' \
+target, but it is deprecated and will be removed in future version of Git, \
+define INSTALL_STRIP instead)
 	$(STRIP) $(STRIP_OPTS) $^
 
 ### Flags affecting all rules

base-commit: 35151cf0720460a897cde9b8039af364743240e7
-- 
An old man doll... just what I always wanted! - Clara
Next: Junio C Hamano
Message 1 of 3 in “Makefile: error out invoking strip target”
  1. Makefile: error out invoking strip targetBagas Sanjaya, Nov 25, 2021
  2. Junio C HamanoNov 26, 2021
  3. Bagas SanjayaNov 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.