comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: File Name Rules
Date: 1996/07/09
Date: 1996-07-09T00:00:00+00:00	[thread overview]
Message-ID: <dewar.836951275@schonberg> (raw)
In-Reply-To: 4ruegk$42b@catapult.gatech.edu


iDaniel asks

"I am working on some software that I want to compile with two compilers:
Alsys Activada (Windows 3.11) and GNAT 3.05 (Linux).  The problem I'm having
is GNAT asks for the full compilation unit name, while ActivAda wants a
shortened name. I don't want to go through and change all the file names,
around 200 files, sheez.  I've looked, but are you familiar with GNAT enough
to tell/point me further?? Like some command line option (-gnatv)..?"

Consulting once again my secret source of information, namely the GNAT
documentation, I find a useful section called:

pragma Source_File_Name
-----------------------

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:

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

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.

Any number of Source_File_Name pragmas can be put in a file called
gnat.adc and will apply to compilations in the current directory.

Unless the extension of the filename is ".ads", ".adb", or ".ada",
you must prefix the filename with "-x ada" on the gcc command you
use to compile it.  That prefix applies to all subsequent filenames
on the command unless you disable it with "-x none".


It is well worth reading gnatinfo.txt end to end if you are a GNAT user,
it is not that long and has all sorts of useful information in it!

You could also use -gnatk8 and keep all your file names short all
the time using the default mechanism of GNAT. The Intermetrics front
end can handle any set of file names anyway with its own set of tools,
so I am not sure what is causing you trouble, unless you are indeed
struggling with 8+3 limitations, in which case -gnatk8 is the proper
approach.






  parent reply	other threads:[~1996-07-09  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-09  0:00 File Name Rules Daniel J
1996-07-09  0:00 ` Rob Kirkbride
1996-07-09  0:00   ` Robert Dewar
1996-07-09  0:00 ` Robert Dewar [this message]
1996-07-10  0:00 ` Michael Feldman
replies disabled

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