X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Makefile;h=55765c8a3aa6b3702b230e8efe3c2ab47a6e73e5;hb=7cce5b2cbc12a73eca3f62a885e9dbad17b250a5;hp=081d7550a7dbc91d8360822a4da3ca51c66a33a2;hpb=88965d198f7cd59b593db19ad7c1d54f5993ac0b;p=git.git diff --git a/Makefile b/Makefile index 081d7550a..55765c8a3 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,12 @@ ifndef gitexecdir endif ifndef sharedir +ifeq (git-core,$(notdir $(gitexecdir))) + sharedir := $(dir $(patsubst %/,%,$(dir $(gitexecdir))))share +else sharedir := $(dir $(gitexecdir))share endif +endif ifndef INSTALL INSTALL = install @@ -92,8 +96,12 @@ ifndef V REMOVE_F1 = && echo ' ' REMOVE `basename "$$dst"` && $(RM_RF) "$$dst" endif -TCL_PATH ?= tclsh TCLTK_PATH ?= wish +ifeq (./,$(dir $(TCLTK_PATH))) + TCL_PATH ?= $(subst wish,tclsh,$(TCLTK_PATH)) +else + TCL_PATH ?= $(dir $(TCLTK_PATH))$(notdir $(subst wish,tclsh,$(TCLTK_PATH))) +endif ifeq ($(uname_S),Darwin) TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app @@ -127,7 +135,17 @@ GITGUI_MACOSXAPP := ifeq ($(uname_O),Cygwin) GITGUI_SCRIPT := `cygpath --windows --absolute "$(GITGUI_SCRIPT)"` - gg_libdir_sed_in := $(shell cygpath --windows --absolute "$(gg_libdir)") + + # 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 @@ -142,6 +160,7 @@ endif ifneq (,$(findstring MINGW,$(uname_S))) NO_MSGFMT=1 GITGUI_WINDOWS_WRAPPER := YesPlease + GITGUI_RELATIVE := 1 endif ifdef GITGUI_MACOSXAPP @@ -207,7 +226,7 @@ ifdef NO_MSGFMT MSGFMT ?= $(TCL_PATH) po/po2msg.sh else MSGFMT ?= msgfmt - ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127) + ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) MSGFMT := $(TCL_PATH) po/po2msg.sh endif endif