[Emacs-ada-mode] Thanks and my first enquiry

Stephen Leake stephen_leake at stephe-leake.org
Sun Aug 20 12:36:39 PDT 2006


"The masked-coder known as Randux" <randux at Safe-mail.net> writes:

>> 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.
>
> Yes, and also to explain the installation process for the contents of
> the tarball. 

Do you mean the Emacs tarball, or ada-mode.tar.gz. I guess you
mean the latter. Yes, that needs some explaining.

>> The menu also provides "ada-compile-current", not bound to a key,
>> which generates object code for the current file.
>
> Apparently it doesn't do the full gnatmake, so I think while it's
> aptly named, it's not enough. There should be something such as
> ada-make-current if that makes any sense.

I don't understand what you mean by it.

I think we need some simple examples to help explain/understand this.
I'll work on some in the context of a tutorial in the manual. In the
meantime, can you post some example files, and how you are trying to
compile them?

There is an important difference between files that are Ada main
programs, and files that are Ada, but not main programs.

It only makes sense to invoke compile and link (gnatmake) on Ada main
programs.

It normally makes sense to invoke only syntax check (gnatmake -gnatc)
on non-main programs. It sometimes makes sense to invoke "compile
only, no link" (gnatmake -c) on non-main programs.

But the recommended process is to always invoke 'gnatmake -gnatc' on
the main program, even when you've just edited some other file. That
will identify all of the compilation errors for all the files that
make up the program. When that completes with no errors, then you
invoke 'gnatmake' on the main program, to generate the executable.

Emacs will transparently navigate thru the various files in the
program as you go thru the compilation errors using next-error (C-`).

> But the whole issue of project files and why we need them is still a
> bit of a mystery.

The main use of a project file is to specify multiple directories that
are part of the project.

However, there must also be a way to specify which file is the main
program; apparently that's not clear with the current Ada mode.

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list