macOS High Sierra is out and it’s time once again to build Emacs. Nothing has really changed since my 2017 Sierra update, but let’s put it all together…

Before you start, you need a few dependencies:

  • Xcode (free in the Mac App Store).
  • Autoconf and Automake. The easiest way to use Homebrew via brew install autoconf automake. If you use another package manager, you know how to work it. If you are all-in on building from source, check out the above guide for details.
  • makeinfo (part of the Texinfo suite). Apple ships makeinfo, but at some point the system version fell below the minimum version Emacs needs to build.

makeinfo can also be installed from Homebrew:

1
brew install texinfo

But before building Emacs, you need to get it into your $PATH ahead of /usr/bin/makeinfo

1
export PATH="/usr/local/opt/texinfo/bin:$PATH"

If you want to build Texinfo from source, you can:

1
2
3
4
5
6
7
cd /tmp
curl -O https://ftp.gnu.org/gnu/texinfo/texinfo-6.5.tar.gz
tar xf texinfo-6.5.tar.gz
cd texinfo-6.5
./configure
make
sudo make install

This installs into /usr/local/bin so make sure that’s in your $PATH ahead of /usr/bin

Once you have the prerequisites squared away, the build is the same as it’s been for a while. Get the source:

1
2
git clone git://git.savannah.gnu.org/emacs.git
cd emacs

Checkout the emacs-25 branch (master is the development branch):

1
git checkout emacs-25

Configure and compile (make install build the application bundle, it doesn’t actually install anything):

1
2
3
make configure
./configure --with-ns
make install

Test:

1
open nextstep/Emacs.app

And, if it looks good, install it by revealing it in the Finder:

1
open -R nextstep/Emacs.app

and dragging Emacs to the Applications folder.

This builds Emacs 25.3. There are no major new features from 25.1, but there are some important bug and security fixes.

Enjoy your new lightsaber!

Comments