comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Compilation without implementation source
Date: Sun, 27 Jan 2008 17:25:50 +0000
Date: 2008-01-27T17:25:50+00:00	[thread overview]
Message-ID: <m23asjch9d.fsf@mac.com> (raw)
In-Reply-To: RQ2nj.4030$9j6.456@attbi_s22

"Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org> writes:

> Gene wrote:
>> For an educational exercise using GNAT and gnatmake, I need to hide
>> implementations of some modules from students in the simplest possible
>> way.
>>
>> Is there a way to give them .ali, .ads, and .o files while withholding
>> the corresponding .adb, somehow telling gnatmake (and gnatbind) to
>> ignore the absence?
>
> IIRC, if the .ali files are read-only, GNAT will not require the
> source of the bodies. This may not work for generics or other cases
> where the compilation has a dependency on the body, such as cross-unit
> inlining.

This is pretty close to what gnatmake will do if you give it a
'library' gpr.

I haven't been able to get it to elaborate a static library with
unnecessary sources hidden - and I haven't tried dynamic libraries
yet. Others will know more.



  reply	other threads:[~2008-01-27 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27  3:34 Compilation without implementation source Gene
2008-01-27 17:04 ` Jeffrey R. Carter
2008-01-27 17:25   ` Simon Wright [this message]
2008-01-27 19:54 ` anon
2008-01-27 19:59   ` Pascal Obry
2008-01-28  4:58     ` Gene
replies disabled

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