From bc7a96a8965d4ce0651689301e1702a942dfb9f0 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 18 Aug 2011 00:23:46 -0700 Subject: mergetool--lib: Refactor tools into separate files Individual merge tools are now defined in a mergetools/$tool file which is sourced at runtime. The individual files are installed into $(git --exec-path)/mergetools/. New tools can be added by creating a new file instead of editing the git-mergetool--lib.sh scriptlet. http://thread.gmane.org/gmane.comp.version-control.git/134906/focus=135006 Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 89cc6245a7..1e91b19c4d 100644 --- a/Makefile +++ b/Makefile @@ -302,6 +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 @@ -2257,6 +2258,13 @@ endif 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 @@ -2266,6 +2274,9 @@ 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 -- cgit v1.2.3