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

[PATCH 1/4] Use $(SHELL_PATH) instead of sh in Makefile.

From
LGlufia via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 6, 2020, 01:05 UTC
Message-ID
<1f63b4fc7c2ae1970d7226bbf0b66901528fb9d8.1596675905.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.694.git.1596675905.gitgitgadget@gmail.com>
From: lufia <lufia@lufia.org>

In the not POSIX environment, like Plan 9, sh might not be looked up in the directories named by the $PATH.

Signed-off-by: lufia <lufia@lufia.org>
---
 config.mak.uname | 12 ++++++------
 git-gui/Makefile |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index c7eba69e54..f3eb2b91a2 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -4,12 +4,12 @@
 # Microsoft's Safe Exception Handling in libraries (such as zlib).
 # Typically required for VS2013+/32-bit compilation on Vista+ versions.
 
-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
-uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
-uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
+uname_S := $(shell $(SHELL_PATH) -c 'uname -s 2>/dev/null || echo not')
+uname_M := $(shell $(SHELL_PATH) -c 'uname -m 2>/dev/null || echo not')
+uname_O := $(shell $(SHELL_PATH) -c 'uname -o 2>/dev/null || echo not')
+uname_R := $(shell $(SHELL_PATH) -c 'uname -r 2>/dev/null || echo not')
+uname_P := $(shell $(SHELL_PATH) -c 'uname -p 2>/dev/null || echo not')
+uname_V := $(shell $(SHELL_PATH) -c 'uname -v 2>/dev/null || echo not')
 
 ifdef MSVC
 	# avoid the MingW and Cygwin configuration sections
diff --git a/git-gui/Makefile b/git-gui/Makefile
index f10caedaa7..c47603c397 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -11,9 +11,9 @@ GIT-VERSION-FILE: FORCE
 	@$(SHELL_PATH) ./GIT-VERSION-GEN
 -include GIT-VERSION-FILE
 
-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
+uname_S := $(shell $(SHELL_PATH) -c 'uname -s 2>/dev/null || echo not')
+uname_O := $(shell $(SHELL_PATH) -c 'uname -o 2>/dev/null || echo not')
+uname_R := $(shell $(SHELL_PATH) -c 'uname -r 2>/dev/null || echo not')
 
 SCRIPT_SH = git-gui.sh
 GITGUI_MAIN := git-gui
-- 
gitgitgadget
Previous: Junio C HamanoNext: brian m. carlson
Message 4 of 29 in “Fit the building tools to Plan 9 environment”
  1. 0/4 Fit the building tools to Plan 9 environmentKADOTA, Kyohei via GitGitGadget, Aug 6, 2020
  2. 2/4 Define TAR_CF and TAR_XF variables in Makefilelufia via GitGitGadget, Aug 6, 2020
  3. Junio C HamanoAug 6, 2020
  4. 1/4 Use $(SHELL_PATH) instead of sh in Makefile.lufia via GitGitGadget, Aug 6, 2020
  5. brian m. carlsonAug 6, 2020
  6. Eric SunshineAug 6, 2020
  7. Kyohei KadotaAug 6, 2020
  8. Junio C HamanoAug 6, 2020
  9. Kyohei KadotaAug 10, 2020
  10. 4/4 Use $(LD) instead of $(CC) for linking the object fileslufia via GitGitGadget, Aug 6, 2020
  11. 3/4 Fit to Plan 9's ANSI/POSIX compatibility layerlufia via GitGitGadget, Aug 6, 2020
  12. brian m. carlsonAug 6, 2020
  13. Kyohei KadotaAug 6, 2020
  14. brian m. carlsonAug 6, 2020
  15. Eric SunshineAug 6, 2020
  16. Junio C HamanoAug 6, 2020
  17. Kyohei KadotaAug 10, 2020
  18. brian m. carlsonAug 6, 2020
  19. 0/2 Fit the building tools to Plan 9 environmentKADOTA, Kyohei via GitGitGadget, Sep 9, 2020
  20. 1/2 Fit to Plan 9's ANSI/POSIX compatibility layerKyohei Kadota via GitGitGadget, Sep 9, 2020
  21. Eric SunshineSep 9, 2020
  22. Junio C HamanoSep 9, 2020
  23. Kyohei KadotaSep 10, 2020
  24. 2/2 Use $(LD) instead of $(CC) for linking the object filesKyohei Kadota via GitGitGadget, Sep 9, 2020
  25. 0/2 Fit the building tools to Plan 9 environmentKADOTA, Kyohei via GitGitGadget, Sep 10, 2020
  26. 1/2 Fit to Plan 9's ANSI/POSIX compatibility layerKyohei Kadota via GitGitGadget, Sep 10, 2020
  27. Junio C HamanoSep 10, 2020
  28. 2/2 Use $(LD) instead of $(CC) for linking the object filesKyohei Kadota via GitGitGadget, Sep 10, 2020
  29. Junio C HamanoSep 10, 2020

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.