[Emacs-ada-mode] Using GNAT Project (*.gpr) files with Ada Mode

deadlyhead deadlyhead at deadlyhead.com
Sun Oct 12 00:25:59 PDT 2008


Stephen Leake wrote:
> There are actually two ways to use .gpr files to set Emacs Ada mode
> project variables.
>
> You can specify a .gpr file directly as the Emacs Ada mode project
> file, or you can specify a .gpr file as part of an Emacs Ada mode
> project file.
>
> I use the later, because it lets me also specify capitialization
> exceptions, and other source directories to search, such as for
> Makefiles.
<snip>
>> Well, yes. I mean, that does test them, but if I have to use a shell to
>> run gnatmake so I can use my *.gpr files, then I don't get all the
>> features of Ada Mode, such as jumping to the lines an error occurs on.
>
> With the current Emacs Ada mode, you get this, when you run the
> compilation via M-x compile, or one of the Emacs Ada mode 'build'
> commands.
>
>> Maybe ``organize itself'' was not the best choice of words. What I'd
>> like is to have Ada Mode base all of its compilation commands off of the
>> .gpr files, no .adp files needed.
>
> That is possible.
>
>> Basically, using .gpr files exactly as it uses .adp files (in the
>> version of ada-*.el that I have). I guess that would mean that it'd
>> just call gnatmake -Psomething.gpr from the correct directory
>> whenever it does a build. Unfortunately, I tried setting this switch
>> in my *.adp file, and it tells me that it can't find the file. Guess
>> I'm doing it wrong.
>
> There is a tutorial in the current Emacs Ada mode manual; please try
> it and see if it makes things clearer.
>

Just an update:

I've installed the latest version of ada-mode, and it works great.  I've 
been designating standard *.gpr files as my ada-mode project files, and 
it works just as I'd hoped.  Truly excellent!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://stephe-leake.org/pipermail/emacs-ada-mode_stephe-leake.org/attachments/20081012/71b197f9/attachment.html 


More information about the Emacs-ada-mode mailing list