6

Currently I am at:

mhoggan-C02S81PRG8WM:c_velodyne mhoggan$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc. This is free
software; see the source for copying conditions. There is NO warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0
mhoggan-C02S81PRG8WM:c_velodyne mhoggan$ make --version GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc. This is free
software; see the source for copying conditions. There is NO warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

Is there a way with Homebrew to upgrade to 4.1 or 4.2?

3 Answers 3

8

Yes, you can run:

brew install homebrew/core/make

on earlier systems this was:

brew install homebrew/dupes/make

This will install make 4.2.1.

Another option, if you want to retain the system installed make version, is to install remake instead.

brew install remake
3
  • For the first command, I get "Error: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.
    – tofutim
    Feb 16, 2018 at 1:46
  • They are now at homebrew-core, I have updated the answer. (The answer was from 2016).
    – jksoegaard
    Feb 16, 2018 at 16:30
  • save my day. Thanks.
    – Pengson
    Mar 31, 2021 at 5:27
3

By default homebrew installs GNU make binary with "g" prefix, as: /usr/local/bin/gmake

If you want to install it as make run:

brew install --with-default-names make

Then it will "cover" system's default make assuming /usr/local/bin preceeds /usr/bin (where the system's make resides) in your $PATH.

1
  • 1
    Error: invalid option: --with-default-names
    – Olsonist
    Dec 31, 2021 at 2:28
2

As Michał Szajbe points out, this will install with a g prefix.

The more up to date solution (to make gmake the default make) is to modify your PATH:

Edit your .bashrc or .zshrc etc

...
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"

Running make --version should now reflect the brew installed version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .