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

[PATCH v1 1/4] git gui Makefile - remove Cygwin modifications

From
Mark Levedahl <mlevedahl@gmail.com>
Date
Jun 26, 2023, 16:53 UTC
Message-ID
<20230626165305.37488-2-mlevedahl@gmail.com>
In-Reply-To
<20230626165305.37488-1-mlevedahl@gmail.com>

git-gui's Makefile hardcodes the absolute Windows path of git-gui's libraries into git-gui, destroying the ability to package git-gui on one machine and distribute to others. The intent is to do this only if a non-Cygwin Tcl/Tk is installed, but the test for this is wrong with the unix/X11 Tcl/Tk shipped since 2012. Also, Cygwin does not support a non-Cygwin Tcl/Tk.

The Cygwin git maintainer disables this code, so this code is definitely not in use in the Cygwin distribution.

The simplest fix is to just delete the Cygwin specific code, allowing the Makefile to work out of the box on Cygwin. Do so.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
---
 Makefile | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index a0d5a4b..3f80435 100644
--- a/Makefile
+++ b/Makefile
@@ -138,25 +138,10 @@ GITGUI_SCRIPT   := $$0
 GITGUI_RELATIVE :=
 GITGUI_MACOSXAPP :=
 
-ifeq ($(uname_O),Cygwin)
-	GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"`
-
-	# Is this a Cygwin Tcl/Tk binary?  If so it knows how to do
-	# POSIX path translation just like cygpath does and we must
-	# keep libdir in POSIX format so Cygwin packages of git-gui
-	# work no matter where the user installs them.
-	#
-	ifeq ($(shell echo 'puts [file normalize /]' | '$(TCL_PATH_SQ)'),$(shell cygpath --mixed --absolute /))
-		gg_libdir_sed_in := $(gg_libdir)
-	else
-		gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)")
-	endif
-else
-	ifeq ($(exedir),$(gg_libdir))
-		GITGUI_RELATIVE := 1
-	endif
-	gg_libdir_sed_in := $(gg_libdir)
+ifeq ($(exedir),$(gg_libdir))
+	GITGUI_RELATIVE := 1
 endif
+gg_libdir_sed_in := $(gg_libdir)
 ifeq ($(uname_S),Darwin)
 	ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)
 		GITGUI_MACOSXAPP := YesPlease
-- 
2.41.0.99.19
Previous: Mark LevedahlNext: Mark Levedahl
Message 18 of 27 in “Remove obsolete Cygwin support from git-gui”
  1. 0/4 Remove obsolete Cygwin support from git-guiMark Levedahl, Jun 24, 2023
  2. 1/4 git gui Makefile - remove Cygwin modiificationsMark Levedahl, Jun 24, 2023
  3. 2/4 git-gui - remove obsolete Cygwin specific codeMark Levedahl, Jun 24, 2023
  4. Eric SunshineJun 25, 2023
  5. Mark LevedahlJun 25, 2023
  6. 3/4 git-gui - use cygstart to browse on CygwinMark Levedahl, Jun 24, 2023
  7. 4/4 git-gui - use mkshortcut on CygwinMark Levedahl, Jun 24, 2023
  8. Junio C HamanoJun 24, 2023
  9. Junio C HamanoJun 24, 2023
  10. Mark LevedahlJun 25, 2023
  11. Mark LevedahlJun 25, 2023
  12. Mark LevedahlJun 25, 2023
  13. Junio C HamanoJun 25, 2023
  14. Mark LevedahlJun 25, 2023
  15. Junio C HamanoJun 26, 2023
  16. Mark LevedahlJun 26, 2023
  17. 0/4 Remove obsolete Cygwin support from git-guiMark Levedahl, Jun 26, 2023
  18. 1/4 git gui Makefile - remove Cygwin modificationsMark Levedahl, Jun 26, 2023
  19. 2/4 git-gui - remove obsolete Cygwin specific codeMark Levedahl, Jun 26, 2023
  20. 3/4 git-gui - use cygstart to browse on CygwinMark Levedahl, Jun 26, 2023
  21. 4/4 git-gui - use mkshortcut on CygwinMark Levedahl, Jun 26, 2023
  22. Johannes SchindelinJun 27, 2023
  23. Junio C HamanoJun 27, 2023
  24. Mark LevedahlAug 5, 2023
  25. Pratyush YadavAug 24, 2023
  26. Mark LevedahlAug 29, 2023
  27. Junio C HamanoAug 29, 2023

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.