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>2021-12-01 10:06:27 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-01 13:24:49 +0300
commit825644e434937c2519bd478475a13950f48f2eaa (patch)
treef8ebf30a087ae9f4a4ec6c09ba30601712185763 /Makefile
parent17bb9d1e61ea777d1e113def771fa07f660949ae (diff)
Makefile: Clarify GIT_INSTALL_DIR by renaming it
The GIT_INSTALL_DIR variable points into our own build directory and is the default directory into which Git will be installed in case the user didn't override GIT_PREFIX. The naming of this variable doesn't help at all in underestanding what it does though and frequently leads to confusion which of both variables should be used. Rename the variable to GIT_DEFAULT_PREFIX to clarify what it does.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 9 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 7d3bea2de..6d2431394 100644
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ exec_prefix ?= ${prefix}
bindir ?= ${exec_prefix}/bin
INSTALL_DEST_DIR := ${DESTDIR}${bindir}
## The prefix where Git will be installed to.
-GIT_PREFIX ?= ${GIT_INSTALL_DIR}
+GIT_PREFIX ?= ${GIT_DEFAULT_PREFIX}
# Tools
GIT := $(shell which git)
@@ -104,10 +104,12 @@ else ifeq (${OS},Linux)
endif
# Git target
-GIT_REPO_URL ?= https://gitlab.com/gitlab-org/gitlab-git.git
-GIT_INSTALL_DIR := ${DEPENDENCY_DIR}/git/install
-GIT_SOURCE_DIR := ${DEPENDENCY_DIR}/git/source
-GIT_QUIET :=
+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_SOURCE_DIR := ${DEPENDENCY_DIR}/git/source
+GIT_QUIET :=
ifeq (${Q},@)
GIT_QUIET = --quiet
endif
@@ -576,11 +578,11 @@ ${GIT_SOURCE_DIR}/%: ${GIT_SOURCE_DIR}/Makefile
${Q}touch $@
${GIT_PREFIX}/bin/git: ${GIT_SOURCE_DIR}/Makefile
- # Note that we're deleting GIT_INSTALL_DIR, not GIT_PREFIX: we only
+ # Note that we're deleting GIT_DEFAULT_PREFIX, not GIT_PREFIX: we only
# want to remove the default location in our build directory, but never
# want to delete the actual location the user wants to install to.
# Otherwise, we may end up wiping e.g. `/usr/local`.
- ${Q}rm -rf ${GIT_INSTALL_DIR}
+ ${Q}rm -rf ${GIT_DEFAULT_PREFIX}
${Q}env -u PROFILE -u MAKEFLAGS -u GIT_VERSION ${MAKE} -C ${GIT_SOURCE_DIR} -j$(shell nproc) prefix=${GIT_PREFIX} ${GIT_BUILD_OPTIONS} install
${Q}touch $@