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:
authorAsh McKenzie <amckenzie@gitlab.com>2022-02-03 06:48:19 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2022-02-03 06:48:19 +0300
commit18f2afab42d9280e926ebb25883f4eb448d5088a (patch)
treedc0f395da66bf218de24638c029d82642bbb7184
parent3db92ca403f2dd3a3a3c738ac25d9605570761e7 (diff)
Set LIBPCREDIR if brew command availableashmckenzie/correctly-build-git-on-macos
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c6ccee7d1..e91c89cd5 100644
--- a/Makefile
+++ b/Makefile
@@ -196,6 +196,13 @@ ifeq ($(origin GIT_BUILD_OPTIONS),undefined)
GIT_BUILD_OPTIONS += NO_INSTALL_HARDLINKS=YesPlease
endif
+MACOS_HOMEBREW_PREFIX := $(shell command -v brew > /dev/null 2>&1 && brew --prefix || true)
+
+# LIBPCREDIR needs to explicitly be set for macOS platforms
+ifneq ($(MACOS_HOMEBREW_PREFIX),)
+GIT_BUILD_OPTIONS += LIBPCREDIR="${MACOS_HOMEBREW_PREFIX}/opt/pcre2"
+endif
+
ifdef GIT_APPEND_BUILD_OPTIONS
GIT_BUILD_OPTIONS += ${GIT_APPEND_BUILD_OPTIONS}
endif