[Emacs-ada-mode] Adapting comp_cmd or make_cmd in my .emacs, NOT in some .adp (project) file
Stephen Leake
stephen_leake at stephe-leake.org
Fri Oct 13 01:29:53 PDT 2006
Ludovic Brenta <ludovic at ludovic-brenta.org> writes:
> It seems you are in the same situation as I am. I have an unofficial
> fork of ada-mode that uses .gpr files instead of .adp files. The
> default compilation command passes the -P option, just like you want.
> In addition, it parses the project file to find the source
> directories. C-c C-f then finds the file for you.
>
> Limitations: it does not recurse into "withed" projects, but luckily
> gnatxref (C-c C-d) is there to help you.
That doesn't help with compiler errors that reference sources in
'withed' projects.
> http://www.ada-france.org/debian/ada-mode-4.0.tar.gz
>
> I do hope that one day that will be merged into the main line, but
> there seems to be resistance against GNAT project files for now.
I'm not opposed to integrating GNAT project files in a seamless way; I
think that is the best way to support GNAT in Emacs.
But I do want to retain support for other compilers, other tools, and
extensions to the GNAT project file syntax; I believe that means
retaining the current Emacs ada-mode file format.
And I want to fully support GNAT project files, including 'withed'
projects, since they are crucial to any large project. The simplest
way to do that is to use the GNAT Ada code to parse the GNAT project
files.
Ludovic; have you tried gpr2adp?
Or do you have other ways of solving the above problems?
This discussion has made it clear that gpr2adp should set the compile
commands to use -P<foo.gpr>, rather than the full list of compiler
options. I'll try to work on that this weekend. Or perhaps someone can
contribute a patch.
In addition, Emacs ada-mode should look for a .gpr file wherever it
currently looks for a .adp file; if it finds one, it should check if
the corresponding .adp file is out of date, and run gpr2adp. That's a
bigger job to implement.
Would that work for you?
One issue with all of this is getting the gpr2adp executable.
I have included a Makefile; has anyone tried using it?
For now, I can post a Windows executable on the ada-mode website, if
anyone is interested.
Ludovic; can you provide a Debian executable? or a Debian package, or
shell script?
--
-- Stephe
More information about the Emacs-ada-mode
mailing list