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-06 17:46:20 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-12-06 17:46:55 +0300
commit7306cd80aaa8a5e7d8bf99953f1a2971e5994c4f (patch)
tree51c288fc0c335302cbca5c741656307e00d92d88 /Makefile
parent755ee92ff0c47850a5fee259ea9476d6019173a8 (diff)
Makefile: Allow appending Git and libgit2 build options
When executing `make git`, then Gitaly provides a default set of build options. These include all kinds of things, but most importantly we disable a bunch of options which we don't need at runtime. In case downstream distributions of Gitaly want to build Git with a bunch of additional options though, they have no other way to do so than to copy the default set of options and then append whatever they want to change to this set. This is quite fragile, and any changes done in Gitaly won't be reflected in downstream distributions like this. Improve this by adding two new build variables GIT_APPEND_BUILD_OPTIONS and LIBGIT2_APPEND_BUILD_OPTIONS, which allow appending additional options without overriding the defaults.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d588de8ff..8e9e909eb 100644
--- a/Makefile
+++ b/Makefile
@@ -176,6 +176,10 @@ ifeq ($(origin GIT_BUILD_OPTIONS),undefined)
GIT_BUILD_OPTIONS += NO_INSTALL_HARDLINKS=YesPlease
endif
+ifdef GIT_APPEND_BUILD_OPTIONS
+ GIT_BUILD_OPTIONS += ${GIT_APPEND_BUILD_OPTIONS}
+endif
+
# libgit2 target
LIBGIT2_REPO_URL ?= https://gitlab.com/libgit2/libgit2
LIBGIT2_SOURCE_DIR ?= ${DEPENDENCY_DIR}/libgit2/source
@@ -202,6 +206,10 @@ ifeq ($(origin LIBGIT2_BUILD_OPTIONS),undefined)
LIBGIT2_BUILD_OPTIONS += -DREGEX_BACKEND=builtin
endif
+ifdef LIBGIT2_APPEND_BUILD_OPTIONS
+ LIBGIT2_BUILD_OPTIONS += ${LIBGIT2_APPEND_BUILD_OPTIONS}
+endif
+
# These variables control test options and artifacts
## List of Go packages which shall be tested.
## Go packages to test when using the test-go target.