Merge branch 'da/difftool-mergtool-refactor'
authorJunio C Hamano <gitster@pobox.com>
Thu, 25 Aug 2011 23:00:43 +0000 (16:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 25 Aug 2011 23:00:43 +0000 (16:00 -0700)
* da/difftool-mergtool-refactor:
mergetools/meld: Use '--output' when available
mergetool--lib: Refactor tools into separate files
mergetool--lib: Make style consistent with git
difftool--helper: Make style consistent with git

1  2 
Makefile
diff --combined Makefile
index 7149d46e9cd3922b3912f6df82cacb67e2d9358e,1e91b19c4d7167e69d8fe84cda49419ca52280d9..6bf7d6c30f41cf0046d992c166e9a688a9af0b72
+++ b/Makefile
@@@ -302,6 -302,7 +302,7 @@@ bindir = $(prefix)/$(bindir_relative
  mandir = share/man
  infodir = share/info
  gitexecdir = libexec/git-core
+ mergetoolsdir = $(gitexecdir)/mergetools
  sharedir = $(prefix)/share
  gitwebdir = $(sharedir)/gitweb
  template_dir = share/git-core/templates
@@@ -642,7 -643,6 +643,7 @@@ LIB_OBJS += pack-revindex.
  LIB_OBJS += pack-write.o
  LIB_OBJS += pager.o
  LIB_OBJS += parse-options.o
 +LIB_OBJS += parse-options-cb.o
  LIB_OBJS += patch-delta.o
  LIB_OBJS += patch-ids.o
  LIB_OBJS += path.o
@@@ -2205,7 -2205,7 +2206,7 @@@ test-delta$X: diff-delta.o patch-delta.
  
  test-line-buffer$X: vcs-svn/lib.a
  
 -test-parse-options$X: parse-options.o
 +test-parse-options$X: parse-options.o parse-options-cb.o
  
  test-string-pool$X: vcs-svn/lib.a
  
@@@ -2258,6 -2258,13 +2259,13 @@@ endi
  gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir))
  export gitexec_instdir
  
+ ifneq ($(filter /%,$(firstword $(mergetoolsdir))),)
+ mergetools_instdir = $(mergetoolsdir)
+ else
+ mergetools_instdir = $(prefix)/$(mergetoolsdir)
+ endif
+ mergetools_instdir_SQ = $(subst ','\'',$(mergetools_instdir))
  install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X)
  
  install: all
        $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
        $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
+       $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)'
+       (cd mergetools && $(TAR) cf - .) | \
+       (cd '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' && umask 022 && $(TAR) xof -)
  ifndef NO_PERL
        $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
        $(MAKE) -C gitweb install