Skip to content

Commit

Permalink
brew: autodetect path when building formulas
Browse files Browse the repository at this point in the history
When `brew install` builds from source, the brew binary
is not necessarily in PATH, so autodetect it in a way
that works for both intel and arm.

Ref dciabrin/homebrew-ngdevkit#4
  • Loading branch information
dciabrin committed Sep 10, 2023
1 parent 8bae8a8 commit 7d2d5ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ GDB_LD_BUILD_FLAGS=
GDB_PKG_CONFIG_PATH=

ifeq ($(shell uname -s),Darwin)
HOMEBREW_PREFIX=$(shell brew --prefix)
HOMEBREW_PREFIX=$(shell PATH="$$PATH:/opt/homebrew/bin:/usr/local/bin" brew --prefix)

GDB_C_BUILD_FLAGS+=-I$(HOMEBREW_PREFIX)/opt/readline/include
GDB_CXX_BUILD_FLAGS+=-I$(HOMEBREW_PREFIX)/opt/readline/include
GDB_LD_BUILD_FLAGS+=-L$(HOMEBREW_PREFIX)/opt/readline/lib
Expand Down

0 comments on commit 7d2d5ed

Please sign in to comment.