They need the gitexecdir.

Signed-off-by: Felipe Contreras <>

Otherwise this makes it difficult to package contrib scripts in certain

For example, if you have a proper Makefile in contrib:

TESTS := $(wildcard test*.sh)
SCRIPTS := $(wildcard git-remote-*.py)

export T := $(addprefix $(CURDIR)/,$(TESTS))
export MAKE := $(MAKE) -e
export PATH := $(CURDIR):$(PATH)
export TEST_LINT := test-lint-executable test-lint-shell-syntax

export SCRIPT_PYTHON := $(addprefix $(CURDIR)/,$(SCRIPTS))

all: $(SCRIPTS)
        $(MAKE) -C ../.. build-python-script

        $(MAKE) -C ../.. install-python-script

test: all
        $(MAKE) -C ../../t $@

$(TESTS): all
        $(MAKE) -C ../../t $(CURDIR)/$@

.PHONY: all install test $(TESTS)

A packager might create a git-bzr package that does this:

% make -C contrib/remote-helpers install

But that would fail, unless this patch is applied.

Distributions like Arch Linux don't have a concept of multiple binary packages
from a single source package, so there would need to be a separate PKGBUILD
(akin to spec file) for git-bzr. In addition this package might not be
official, but part of the user maintained AUR. Similarly, other distributions
might want to package git-bzr separetly, for example from launchpad.

 Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3588ca1..e51b92e 100644
--- a/Makefile
+++ b/Makefile
@@ -511,12 +511,14 @@ build-perl-script: $(SCRIPT_PERL_GEN)
 build-sh-script: $(SCRIPT_SH_GEN)
 build-python-script: $(SCRIPT_PYTHON_GEN)
-.PHONY: install-perl-script install-sh-script install-python-script
-install-sh-script: $(SCRIPT_SH_INS)
+.PHONY: install-gitexecdir install-perl-script install-sh-script 
+       $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+install-sh-script: $(SCRIPT_SH_INS) | install-gitexecdir
        $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-install-perl-script: $(SCRIPT_PERL_INS)
+install-perl-script: $(SCRIPT_PERL_INS) | install-gitexecdir
        $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
-install-python-script: $(SCRIPT_PYTHON_INS)
+install-python-script: $(SCRIPT_PYTHON_INS) | install-gitexecdir
        $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
 .PHONY: clean-perl-script clean-sh-script clean-python-script

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to