Build from scratch because most of the packages you use have updated to the nearly-completed next version, so why not pull that?
An alternative is to use home brew HEAD, but this is more fun.
Probably should have Xcode installed, but at least try:
$ xcode-select --install
to get the command line tools. Homebrew will probably insist on this, too. If you see a libxml2 error, this might be way.
Check out the official repo:
$ git clone git://git.savannah.gnu.org/emacs.git
If you want a branch:
$ git checkout emacs-26
Install this stuff via Homebrew:
$ brew install make automake texinfo gnutls libxml2 imagemagick
Add to your path before building:
$ export PATH=/usr/local/opt/texinfo/bin:$PATH
Fish shell version:
$ set -gx PATH /usr/local/opt/texinfo/bin $PATH
Then:
$ make configure
$ ./configure --build=x86_64-apple-darwin --without-dbus --with-ns CFLAGS="-I /usr/local/Cellar/libxml2/2.9.7/include/libxml2"
$ gmake install
$ cp -r nextstep/Emacs.app /Applications
Note the CFLAGS
thing above.
gmake
is the homebrew installed version of make
. Regular make
works, too.
Also note, that you probably don't need the --
flags in
./configure
. I think they're the defaults.
Fails due to missing LIBXML include
Make sure the include path is viable in the above ./configure
command. For instance, after a Homebrew update.
Just:
$ git fetch
$ git log HEAD..FETCH_HEAD --pretty=format:"%C(auto)%h %C(auto)%d %s (%C(cyan)%aE)" --graph
$ git merge
$ gmake install
$ cp -r nextstep/Emacs.app /Applications