I have two questions regarding make
on my Mac: one regarding installation of a second make
flavor, the second regarding how to manage the two flavors.
I need to install BSD make
on my Mac, but I don't want to remove the GNU make
that is standard on the Mac; Berkeley is for a special project. In spite of the extensive resources for installing BSD, I haven't been able to figure out where to get and how to install that single program. What is the best way to do this?
I'm thinking that I'll need to put it in /usr/local/bin
while GNU make
, which was provided by the Mac OS developer tools, will stay where it is in /bin
. Then I can manage which make is called with an alias. I'm still a *nix newbie; is this a reasonable strategy or is there a better way?
If you don't already have a /usr/bin/bsdmake
(apparently it used to come with OS X/Xcode, but no longer does), install Homebrew, then:
brew install bsdmake
To avoid conflicts with GNU make, Homebrew will install BSD make as bsdmake
. In most cases it should be sufficient to build your software with bsdmake all
. Sometimes you may have to tell it that your BSD make is called bsdmake
and not make
.
If you decide to get rid of BSD make for whatever reason, Homebrew will be happy to clean up for you by invoking:
brew uninstall bsdmake
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With