git-gui: Bind M1-P to push action
[gitweb.git] / Makefile
index 404bff0ad9d04939e77ff516b018f71486d1acac..ab550fc6a70f861f7e6eac5295342ccc95aee9a3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,17 +2,13 @@ all::
 
 # Define V=1 to have a more verbose compile.
 #
-QUIET =
-QUIET_MSG = :
-ifndef V
-    QUIET = @
-    QUIET_MSG = echo '   '
-endif
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
        @$(SHELL_PATH) ./GIT-VERSION-GEN
 -include GIT-VERSION-FILE
 
+uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
+
 SCRIPT_SH = git-gui.sh
 GITGUI_BUILT_INS = git-citool
 ALL_PROGRAMS = $(GITGUI_BUILT_INS) $(patsubst %.sh,%,$(SCRIPT_SH))
@@ -64,11 +60,15 @@ exedir_SQ = $(subst ','\'',$(exedir))
 
 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
        $(QUIET_GEN)rm -f $@ $@+ && \
+       GITGUI_RELATIVE= && \
        if test '$(exedir_SQ)' = '$(libdir_SQ)'; then \
-               GITGUI_RELATIVE=1; \
+               if test "$(uname_O)" = Cygwin; \
+               then GITGUI_RELATIVE= ; \
+               else GITGUI_RELATIVE=1; \
+               fi; \
        fi && \
        sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-               -e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
+               -e 's|^ exec wish "$$0"| exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
                -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
                -e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \
                -e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \
@@ -115,14 +115,12 @@ GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
 all:: $(ALL_PROGRAMS) lib/tclIndex
 
 install: all
-       $(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
-       $(QUIET)$(QUIET_MSG)INSTALL git-gui; $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
-       $(QUIET)$(foreach p,$(GITGUI_BUILT_INS),$(QUIET_MSG)INSTALL $p;\
-           rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && \
-           ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
-       $(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(libdir_SQ)'
-       $(QUIET)$(foreach p,lib/tclIndex $(ALL_LIBFILES), $(QUIET_MSG)INSTALL $p;\
-           $(INSTALL) -m644 $p '$(DESTDIR_SQ)$(libdir_SQ)' ;)
+       $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+       $(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+       $(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+       $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(libdir_SQ)'
+       $(INSTALL) -m644 lib/tclIndex '$(DESTDIR_SQ)$(libdir_SQ)'
+       $(foreach p,$(ALL_LIBFILES), $(INSTALL) -m644 $p '$(DESTDIR_SQ)$(libdir_SQ)' ;)
 
 dist-version:
        @mkdir -p $(TARDIR)