comp.lang.ada
 help / color / mirror / Atom feed
From: Tucker Taft <stt@averstar.com>
Subject: Re: Source code representation
Date: 2000/11/27
Date: 2000-11-27T16:36:15+00:00	[thread overview]
Message-ID: <3A228D7F.2E2EB8ED@averstar.com> (raw)
In-Reply-To: tglmualvdw.fsf@mercury.rus.uni-stuttgart.de

Florian Weimer wrote:
> 
> The file-centered approach used by GNAT is close enough to what other
> programming language implementations do on unixoid platforms
> traditionally.  I've never used another Ada compiler, and I wonder if
> other vendors choose a different model (i.e. precompilation of specs
> and bodies and some kind of library repository).  Are there any other
> Ada compilers which can directly use separate body/spec files in the
> way GNAT mandates them?

All Ada compilers can handle source split up into separate
body/spec files.  However, some require Ada code to have
a particular filename suffix (e.g. ".a"), though that seems
rarer these days.  Because of GNAT's popularity, almost all
compilers accept the .ads/.adb suffix as well.  

I suppose part of your question might be whether you have
to take some additional step, or compile in some particular
order, with a non-GNAT compiler.  The answer is probably yes.
However, that doesn't really affect the representation of
the source.  

For example, with the compilers based on
the AverStar AdaMagic front end (Green Hills and Aonix),
there is a "registration" step which creates a map between
source code and Ada unit name.  This is optional if you compile
in the "right" order, but if you want to compile in a random
order, you need to initialize the "UNIT.MAP" file.  Note that
both of these compilers come with their own integrated development
environment, which may more or less hide this requirement by
bundling it in with the notion of adding source files/directories
to a "project" or equivalent.

> (I'm interested in this because I'm going to try to push some
> Ada-related directory into the FHS standard, and the following
> question arises: Are directories containing .ads/.adb files
> GNAT-specific, practically speaking, or not?)

GNAT-compatible source file organization is generally accepted by any 
Ada 95 compiler, though as mentioned above, you may have to
compile in a particular order or perform some kind of "registration"
step.

-- 
-Tucker Taft   stt@averstar.com   http://www.averstar.com/~stt/
Technical Director, Commercial Division, AverStar (formerly Intermetrics)
(http://www.averstar.com/services/IT_consulting.html)  Burlington, MA  USA




  parent reply	other threads:[~2000-11-27  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-23  0:00 Source code representation Florian Weimer
2000-11-23  0:00 ` Ted Dennison
2000-11-27  0:00 ` Tucker Taft [this message]
2000-11-27  0:00   ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox