comp.lang.ada
 help / color / mirror / Atom feed
* File Name Rules
@ 1996-07-09  0:00 Daniel J
  1996-07-09  0:00 ` Robert Dewar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Daniel J @ 1996-07-09  0:00 UTC (permalink / raw)



Fellow Ada programmers,
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)..?

Thanks,
--
Daniel J. Feren
gt7693d@prism.gatech.edu
GTRI ELSYS-SEN   
Team-Ada: Proud of It.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Name Rules
  1996-07-09  0:00 File Name Rules Daniel J
  1996-07-09  0:00 ` Robert Dewar
@ 1996-07-09  0:00 ` Rob Kirkbride
  1996-07-09  0:00   ` Robert Dewar
  1996-07-10  0:00 ` Michael Feldman
  2 siblings, 1 reply; 5+ messages in thread
From: Rob Kirkbride @ 1996-07-09  0:00 UTC (permalink / raw)



In article <4ruegk$42b@catapult.gatech.edu>, Daniel J
<gt7693d@acmex.gatech.edu> writes
>Fellow Ada programmers,
>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)..?
>
>Thanks,
>--
>Daniel J. Feren
>gt7693d@prism.gatech.edu
>GTRI ELSYS-SEN   
>Team-Ada: Proud of It.

I tend to use symbolic links, I am also using two compilers and wrote a
perl script to take a set of ada files and create a symbolic link by
looking into the actual file and deciding what the gnat filename should
be. Its not ideal but it saves inserting nasty pragmas everywhere,
getting warnings from one or another compiler

-- 
Rob Kirkbride




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Name Rules
  1996-07-09  0:00 ` Rob Kirkbride
@ 1996-07-09  0:00   ` Robert Dewar
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 1996-07-09  0:00 UTC (permalink / raw)



Rob said

"I tend to use symbolic links, I am also using two compilers and wrote a
perl script to take a set of ada files and create a symbolic link by
looking into the actual file and deciding what the gnat filename should
be. Its not ideal but it saves inserting nasty pragmas everywhere,
getting warnings from one or another compiler"

There is no need to "insert nasty pragmas everywhere". To specify a
set of file names to GNAT that is not the default, simply create a
file gnat.adc that contains the list of file name to unit name
translations.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Name Rules
  1996-07-09  0:00 File Name Rules Daniel J
@ 1996-07-09  0:00 ` Robert Dewar
  1996-07-09  0:00 ` Rob Kirkbride
  1996-07-10  0:00 ` Michael Feldman
  2 siblings, 0 replies; 5+ messages in thread
From: Robert Dewar @ 1996-07-09  0:00 UTC (permalink / raw)



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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: File Name Rules
  1996-07-09  0:00 File Name Rules Daniel J
  1996-07-09  0:00 ` Robert Dewar
  1996-07-09  0:00 ` Rob Kirkbride
@ 1996-07-10  0:00 ` Michael Feldman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Feldman @ 1996-07-10  0:00 UTC (permalink / raw)



In article <4ruegk$42b@catapult.gatech.edu>,
Daniel J <gt7693d@acmex.gatech.edu> wrote:
>Fellow Ada programmers,
>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)..?

I think Activada is not particular about the filenames, so you can
use gnatchop to make copies that will have the standard GNAT 8+3 krunched
names.

See gnatinfo.txt for info on gnatchop. You can easily write a script
to go through a directory and gnatchop everything in it.

Mike Feldman




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1996-07-10  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-09  0:00 File Name Rules Daniel J
1996-07-09  0:00 ` Robert Dewar
1996-07-09  0:00 ` Rob Kirkbride
1996-07-09  0:00   ` Robert Dewar
1996-07-10  0:00 ` Michael Feldman

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