X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Makefile;h=55765c8a3aa6b3702b230e8efe3c2ab47a6e73e5;hb=7cce5b2cbc12a73eca3f62a885e9dbad17b250a5;hp=1ba0e788f9a99980b4ab3a35f213f0a4ffcbaa1e;hpb=651fbba2d36072b2491bc53628159ff4fb3085dc;p=git.git diff --git a/Makefile b/Makefile index 1ba0e788f..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 @@ -131,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 @@ -146,6 +160,7 @@ endif ifneq (,$(findstring MINGW,$(uname_S))) NO_MSGFMT=1 GITGUI_WINDOWS_WRAPPER := YesPlease + GITGUI_RELATIVE := 1 endif ifdef GITGUI_MACOSXAPP @@ -211,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