comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Using GNAT with SunAda?
Date: 1996/03/18
Date: 1996-03-18T00:00:00+00:00	[thread overview]
Message-ID: <dewar.827153109@schonberg> (raw)
In-Reply-To: qw6enqqeiq9.fsf@gargantua.enst.fr

Sam wrote:

  gcc -x ada -c myfile.a


of course!! I knew this feature, but had forgotten it. Must have been 
sleeping when I answered it the other day. So, given this capability
in the gcc command, all you need to do is to tell GNAT to use the
non-standard file names for with statements.

This is done by using a file called gnat.adc containing 
source_file_name pragmas to specify the file names being used.
Here is the documentation for the source_file_name pragma:

   --  pragma Source_File_Name (
   --    [UNIT_NAME =>] unit_NAME,
   --    [BODY_FILE_NAME | SPEC_FILE_NAME] => STRING_LITERAL)

   --    The source file name pragma allows a program to override the normal
   --    naming convention. It is a configuration pragma, and so has the usual
   --    applicability of configuration pragmas (i.e. it applies to either an
   --    entire partition, or to all units in a compilation, or to a single
   --    unit, depending on how it is used. The form of the pragma is:

   --    The given unit name is mapped to the given file name. The identifier
   --    for the second argument is required, and indicates whether this is
   --    the file name for the spec or for the body.

an example for the above file would be

  pragma Source_File_Name (My_Unit_Name, Spec_File_Name => "myfile.a");





      reply	other threads:[~1996-03-18  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4iaor8$lnk@s-cwis.unomaha.edu>
1996-03-16  0:00 ` Using GNAT with SunAda? Robert Dewar
1996-03-18  0:00   ` Rolf Ebert
1996-03-18  0:00 ` Samuel Tardieu
1996-03-18  0:00   ` Robert Dewar [this message]
replies disabled

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