[Emacs-ada-mode] The basic philosophy of ada-mode
Ludovic Brenta
ludovic at ludovic-brenta.org
Tue Aug 22 07:15:53 PDT 2006
Emmanuel Briot wrote:
> Ludovic Brenta wrote:
>> In this context, there *must* be a command to recompile the whole
>> *project*, and "recompile current file" may actually be harmful. In
>> fact, the way I usually separate object files from source files, it
>> is
>> often harmful.
>
> There is no reason why it should be harmful:
> - if you are using a .gpr file, the object file will be put at the
> right location, and you don't end up with duplicate .o files
> - if not, you should use gnatmake -i, to override an existing .o
> file
> with the same name.
The way "recompile file" can be harmful is precisely in that it may not
find the project (.adp or .gpr, whatever) file, or use the wrong one.
For example it might compile to the wrong object directory, or with the
wrong options. Or, it might fail to compile altogether because gnatmake
doesn't find units the current file depends on, etc.
What I meant to say is that, *if* you have a multi-file project, then
you *want* to use the project's settings to compile and nothing else.
There is currently no way to tell ada-mode that "the current file is not
part of the current project"; but there is a way to override the default
compilation command, which uses the project settings.
--
Ludovic Brenta.
More information about the Emacs-ada-mode
mailing list