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

mats cronqvist <>
Sun May 10 12:01:38 CEST 2009

Andrew Thompson <> writes:

> 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.

  Apologies for being rather unhelpful, but what are you trying to
  accomplish here? Disable the evaluation of .erlang? Wouldn't it be
  easier to just do "rm ~/.erlang"?


More information about the erlang-questions mailing list