[erlang-questions] Joe's book, ~/.erlang and Makefiles

Andrew Thompson andrew@REDACTED
Sun May 10 03:05:13 CEST 2009


So, I've run into this problem twice now, and I'm wondering if there's a
workaround that googling and grepping all the .erl files in the erlang
distribution hasn't revealed.

In Joe's book, he apparently has people put "io:format("Running
Erlang~n")." in their ~/.erlang file to illustrate how to modify
default behaviour. That's fine, but it seems that people forget to
remove it later, so when they try to run a Makefile that does something
like this:

ERLANG_LIBDIR=`$ERLANG -noshell -eval 'io:format("~s/lib~n", [[code:lib_dir("erl_interface")]]).' -s erlang halt`

it all goes rather wrong. I've managed to find the erlangrc() function
in stdlib/src/c.erl but I can't figure out what is calling it. I wonder
why ~/.erlang is even evaluated when running with -noshell but I can't
find a way to bypass it in any case.

Any ideas?

Andrew



More information about the erlang-questions mailing list