[erlang-questions] Sharing code between modules with emacs
Mon Feb 19 12:52:21 CET 2007
Or you can add something like this to your erlang hook:
(unless (null buffer-file-name)
(if (file-exists-p "Emakefile") "erl -make"
(if (file-exists-p "../ebin") "-o ../ebin " "")
(if (file-exists-p "../include") "-I ../include " ""))
"+debug_info -W " buffer-file-name)))))
In which case it will use a Emakefile if possible, else erlc with the
"right" switches depending on your environment
Erlang Training & Consulting
> Guest wrote:
> A second question : how can I make the emacs shell to compile the files in
> the ebin directory instead of the src one ?
> And have it looking for the .hrl in the include directory ?
> (end of quote)
> Assuming you follow Adams advise and create your Emakefile you can, when
> in Emacs (and is in the right working directory) use M-x and type in
> compile, enter, then erl -make and enter. This should compile the files
> and put them in whatever directory you specified.
> Post sent from http://www.trapexit.org
> erlang-questions mailing list
More information about the erlang-questions