[Emacs-ada-mode] Thanks and my first enquiry
Stephen Leake
stephen_leake at stephe-leake.org
Sun Aug 20 07:35:53 PDT 2006
I'll try to summarize some of the points made here, and add them to
the web page. I think it is also clear that there should be an Emacs
Ada mode manual, to explain these top-level issues.
The current Emacs Ada mode is designed to allow compiling Ada main
programs consisting of multiple files, spread across multiple
directories, without using makefiles; only gnatmake is needed.
To do this, an Emacs Ada project file is required, typically one per
main program.
The Emacs Ada mode menus and keybindings provide "compile" bound to
C-c C-c, which is intended to invode gnatmake with the appropriate
options in the appropriate directory to build the main program.
The menu and keybindings also provide "ada-check-current" bound to C-c
C-v, which is intended to perform syntax checking only (not object
code generation) on the current file.
The menu also provides "ada-compile-current", not bound to a key,
which generates object code for the current file.
Note that it is usually more efficient (in both CPU time and
programmer time) to invoke only syntax checking when editing files to
fix compilation errors, and then invoke "compile" only when all syntax
errors are fixed.
The menu also provides "ada-set-default-project-file" bound to C-c d,
which specifies the current Emacs Ada mode project file.
I think the project file can specify the main program, but I haven't
checked that.
This is relevant to the issue of switching from Emacs Ada mode project
files (*.adp) to GNAT project files (*.gpr). GNAT project files are
more powerful, and better integrated with gnatmake. Currently, a
project using gpr files and Emacs Ada mode must also maintain a
separate Emacs Ada mode project file; we'd like to eliminate that.
It appears to be the consensus of the Ada community that makefiles
should not be required (or even preferred) for building pure Ada
programs, and therefore Emacs Ada mode should fully support that mode
of operation.
At the same time, since makefiles are required for more complex
projects, Emacs Ada mode should be able to work nicely with makefiles.
This is not currently an issue, but I think it's worth stating.
--
-- Stephe
More information about the Emacs-ada-mode
mailing list