I just went through the steps of installing Erlang and Emacs (which is the official development environment for Erlang) on my Macbook Pro, and since it was a little convoluted, I thought I'd share it.
-----
This document explains the steps needed to install Erlang with Emacs support on Mac OSX 10.5. I've chosen to install Erlang from source, because the Mac binaries tend to be out of date. For emacs, I've chosen Aquamacs, which is a nice native Mac emacs distribution.
For release 13B, eunit is broken, so download the fix (http://erlang.org/download/patches/eunit-2.1.1.tar.gz), untar it, and sudo mv the resultant directory to /usr/local/lib/erlang/lib/.
-----
This document explains the steps needed to install Erlang with Emacs support on Mac OSX 10.5. I've chosen to install Erlang from source, because the Mac binaries tend to be out of date. For emacs, I've chosen Aquamacs, which is a nice native Mac emacs distribution.
- First, I needed to download and install iPhone SDK, in order to get a C compiler (gcc). Could have gotten it from Developer Tools on the Mac OSX install disks, but I wanted the iPhone SDK anyway.
- Next, download erlang from source: http://erlang.org/download.html
- tar -xvzf otp_src_R13B.tar.gz, cd otp_src_R13B, ./configure, make, sudo make install
- Run erl in a terminal to make sure the erlang interpreter starts properly.
- Next, download Aquamacs, which is a native Mac emacs distribution. http://aquamacs.org/
- Next, setup Aquamacs for erlang: erlang comes with emacs mode in its distribution, it's just a matter of finding it. The standard install has it at /usr/local/lib/erlang/lib/tools-x.y.z/emacs (mine was at tools-2.6.4).
- Copy erlang.el and erlang-start.el from the Tools directory to ~/Library/Application Support/Aquamacs Emacs/erlang (need to make the "erlang" subdirectory)
- Create site-start.el in the same Aquamacs directory, which just has one line: (require 'erlang-start)
- Good to go! Open a .erl file in Aquamacs - it should go into Erlang mode.
For release 13B, eunit is broken, so download the fix (http://erlang.org/download/patches/eunit-2.1.1.tar.gz), untar it, and sudo mv the resultant directory to /usr/local/lib/erlang/lib/.
Comments
Post a Comment