[Emacs-ada-mode] Main programs

Stephen Leake stephen_leake at stephe-leake.org
Wed Nov 19 12:34:01 PST 2008


Simon Wright <simon at pushface.org> writes:

> On 19 Nov 2008, at 13:49, Stephen Leake wrote:
>
>> Ah; you want to set the main program in the Emacs Ada mode project
>> settings from the statment in the GPR file.
>>
>> This is problematic; there can be many programs listed in the "for
>> Main" statement (the parens mean it's a list of strings); which would
>> we use for the single current Emacs Ada mode project main program?
>
> AdaCore's convert_prj uses the first of the list, if there is one.
> (was that not made available?)

I think 'convert_prj' is only distributed with AdaCore GPS. If you are
using Emacs ada-mode, you're not likely to have GPS installed.

> At the moment ada-prj-default-make-cmd is
>  (concat "${cross_prefix}gnatmake -o ${main} ${main} ${gnatmake_opt} "
> 	  "-cargs ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}")
>
> which forces us to have a ${main}. GPRs would let us say just
>  (concat "${cross_prefix}gnatmake ${gnatmake_opt} "
> 	  "-cargs ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}")
>
> but then it would be harder to specify a non-default main!

You can set this value in your Emacs Ada mode project file, if you
always specify main in the gpr file.

>> Also, the current output from gnatls doesn't list this setting. I
>> don't see any 'gnat ...' commands that do output this information. So
>> we'd have to add one, after figuring out the Ada code that would
>> return it (the 'gnat list' source is _not_ pretty!).
>
> That would be a bit of a stopper, I admit (but, again, what about
> convert_prj?

I could look at the source for convert_prj; not high on my list of
things to do at the moment.

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list