Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-08-10 11:11:10 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-08-10 12:29:00 +0300
commitdf88aa383594ca74103847d68e6c12448b1d369e (patch)
treebfe58eae3f59c96a65af7cb7bdc44a824be740e1
parent785af77b24396142eb5977f24713aa4154453bbd (diff)
Makefile: Drop the default Git prefix
Now that our tests don't depend on the `git` target anymore but instead us the bin-wrappers we can drop the default installation prefix of the `git` target. Instead, we'll now set it up the same as the `PREFIX` by default but keep it overridable. This both simplifies the logic we have where we don't need to remove the default prefix anymore, but it also causes us to pay proper attention to the `PREFIX` variable by default when we install Git. While the `GIT_PREFIX` variable is essentially useless now we still keep it to remain compatible with existing calling conventions.
-rw-r--r--Makefile11
1 files changed, 1 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index bef3b7c1e..6cb1d22e8 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ exec_prefix ?= ${prefix}
bindir ?= ${exec_prefix}/bin
INSTALL_DEST_DIR := ${DESTDIR}${bindir}
## The prefix where Git will be installed to.
-GIT_PREFIX ?= ${GIT_DEFAULT_PREFIX}
+GIT_PREFIX ?= ${PREFIX}
# Tools
GIT := $(shell command -v git)
@@ -133,9 +133,6 @@ endif
# Git target
GIT_REPO_URL ?= https://gitlab.com/gitlab-org/gitlab-git.git
-# The default prefix specifies where Git will be installed to if no GIT_PREFIX
-# was given. This directory will be cleaned up before we install into it.
-GIT_DEFAULT_PREFIX := ${DEPENDENCY_DIR}/git/install
GIT_QUIET :=
ifeq (${Q},@)
GIT_QUIET = --quiet
@@ -569,12 +566,6 @@ ${DEPENDENCY_DIR}: | ${BUILD_DIR}
# This target installs the full Git distribution into GIT_PREFIX.
${GIT_PREFIX}/bin/git: ${DEPENDENCY_DIR}/git-distribution/git
- @ # Remove the Git installation first in case GIT_PREFIX is the default
- @ # prefix which always points into our build directory. This is done so
- @ # we never end up with mixed Git installations on developer machines.
- @ # We cannot ever remove GIT_PREFIX though in case they're different
- @ # because it may point to a user-controlled directory.
- ${Q}if [ "x${GIT_DEFAULT_PREFIX}" = "x${GIT_PREFIX}" ]; then rm -rf "${GIT_DEFAULT_PREFIX}"; fi
${Q}env -u PROFILE -u MAKEFLAGS -u GIT_VERSION ${MAKE} -C "$(<D)" -j$(shell nproc) prefix=${GIT_PREFIX} ${GIT_BUILD_OPTIONS} install
${Q}touch $@