<span style>Here is a patch that allows compile:forms() to receive a source option that specifies the source value returned by module_info(compile).</span><div><font color="#222222" face="arial, sans-serif">Currently, there is no way to set the source and Erlang ends up setting the source to the current directory.<br>

</font><div style><br></div><div style>git fetch git://<a href="http://github.com/josevalim/otp.git" target="_blank" style="color:rgb(17,85,204)">github.com/josevalim/otp.git</a> forms-source</div><div style><br></div><div style>

<a href="https://github.com/josevalim/otp/compare/forms-source" target="_blank" style="color:rgb(17,85,204)">https://github.com/josevalim/otp/compare/forms-source</a></div><div style><a href="https://github.com/josevalim/otp/compare/forms-source.patch" target="_blank" style="color:rgb(17,85,204)">https://github.com/josevalim/otp/compare/forms-source.patch</a></div>

<div style><br></div><div style>The patch includes code, tests and docs changes.</div><div style><br></div><div style>For more information, the initial discussion in Erlang Questions mailing list: <a href="http://erlang.org/pipermail/erlang-questions/2012-March/065361.html">http://erlang.org/pipermail/erlang-questions/2012-March/065361.html</a></div>

<div style><br></div><div style>Thanks!</div><div><br></div><div><br></div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="border-collapse:separate;font-family:arial;font-weight:normal"><div>

<span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>

<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></b></span><br>
</div>