This fix makes our Makefile compatible with Homebrew formulae. Below is an explanation of the patch:
During the processing of a formula by Homebrew, $(brew --prefix)/bin is not included in the PATH, resulting in an empty result for which brew. To address this issue, I propose allowing manual setting of BREW_PREFIX. This manual approach will be utilized in the formula: system "make", "BREW_PREFIX=#{prefix}". The flow of PORT_PREFIX was changed for consistency.
During the execution of make install, a couple of targets from src/Makefile are used for version generation. When make install is invoked from the context of Homebrew formula installation, BREW_PREFIX is empty, causing the installation process to abort with the message Neither Homebrew nor MacPorts is installed. I propose changing error to warning here. This will prevent the process from aborting, making the user responsible for not specifying a prefix. Considering that this aspect is intended for developers only, I believe this approach is adequate.
This fix makes our Makefile compatible with Homebrew formulae. Below is an explanation of the patch:
$(brew --prefix)/bin
is not included in thePATH
, resulting in an empty result for which brew. To address this issue, I propose allowing manual setting ofBREW_PREFIX
. This manual approach will be utilized in the formula:system "make", "BREW_PREFIX=#{prefix}"
. The flow ofPORT_PREFIX
was changed for consistency.make install
, a couple of targets from src/Makefile are used for version generation. When make install is invoked from the context of Homebrew formula installation,BREW_PREFIX
is empty, causing the installation process to abort with the messageNeither Homebrew nor MacPorts is installed
. I propose changing error to warning here. This will prevent the process from aborting, making the user responsible for not specifying a prefix. Considering that this aspect is intended for developers only, I believe this approach is adequate.