From 18f2afab42d9280e926ebb25883f4eb448d5088a Mon Sep 17 00:00:00 2001 From: Ash McKenzie Date: Thu, 3 Feb 2022 14:48:19 +1100 Subject: Set LIBPCREDIR if brew command available --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3