[m-users.] Adding a command line option
Mark Green
mgreen at brookes.ac.uk
Tue Jul 30 03:57:54 AEST 2013
Hi,
The problem I've had is that when mmc calls erlc, it passes it two relative
paths in the -I and -O options.
This causes a problem if mmc is running within MSYS under Windows, because
the Windows erlc - being a full blown Windows program, not an MSYS one -
will interpret those paths relative to the current Windows directory, not
to the current MSYS/bash directory, which might not be the same. If they
are not the same then erlc will fail to find the paths and abort.
The change I wanted to make was to calculate the current absolute paths and
pass those to erlc rather than the relative paths, so that it does not
matter which directory erlc considers its base directory.
Mark
On 29 July 2013 18:02, Julien Fischer <jfischer at opturion.com> wrote:
>
>
>
> On Sat, Jul 27, 2013 at 11:53 AM, Peter Wang <novalazy at gmail.com> wrote:
>
>> On Sat, 27 Jul 2013 01:39:50 +0100, Mark Green <mgreen at brookes.ac.uk>
>> wrote:
>> > Hi,
>> >
>> > What's the easiest way to add a new command line option to mmc? I have
>> been
>> > trying to deal with my Erlang build problem by modifying
>> > compile_target_code.m to pass full paths to erlc, but I would like to
>> make
>> > this behavior optional and I cannot find the part of the code that
>> converts
>> > from strings on the command line to atoms that are looked up via
>> > lookup_bool_option.
>>
>> In options.m. For a quick test, you can make use of an existing
>> string option "--experiment".
>>
>> Which paths are problematic?
>>
>
> I'm not sure about the problem that Mark has encountered, but one issue we
> definitely have
> with the erlang grade on Windows is that the values of
> MERCURY_ERLANG_{COMPILER,INTERPRETER}
> contains spaces if the OTP is installed in the default location (in
> Program Files). This breaks compilation of
> the standard library. We should take the basename of the value returned by
> the configuration tests in this case,
> as we do for the Java tools in the same situation (I'll commit a
> change that does this tomorrow.)
>
> Cheers,
> Julien.
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> http://lists.mercurylang.org/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20130729/b0a26b94/attachment.html>
More information about the users
mailing list