comp.lang.ada
 help / color / mirror / Atom feed
* Filenames vs Compilation Names
@ 1997-06-25  0:00 kgamble
  1997-06-26  0:00 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: kgamble @ 1997-06-25  0:00 UTC (permalink / raw)



It appears that gnat.adc (useful when filenames and unit names do not
match) only works when all sourcefiles are stored in a common directory.

I am porting a large Ada program to OS2 using GNAT 3.09. Files are
organized into many subdirectories and usually have filenames that do not
match compilation names. In the GNAT documentation, the work around is to
use Source_File_Name pragmas stored in a file named gnat.adc

Even though this appears to work when compiling files that are in the same
subdirectory as the gnat.adc file, it doesn't appear to work for files
outside the subdirectory. That is, a compilation unit having a "with
clause" for a unit stored in another subdirectory, the compiler will not
check the gnat.adc for remapping of the filenames. I would have thought
that the compiler would be capable of searching gnat.adc files stored in
other directories. 

Has anyone had any success with using gnat.adc for files stored in
different directories? 






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

* Re: Filenames vs Compilation Names
  1997-06-25  0:00 Filenames vs Compilation Names kgamble
@ 1997-06-26  0:00 ` Robert Dewar
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Dewar @ 1997-06-26  0:00 UTC (permalink / raw)



kgamble says

<<Even though this appears to work when compiling files that are in the same
subdirectory as the gnat.adc file, it doesn't appear to work for files
outside the subdirectory. That is, a compilation unit having a "with
clause" for a unit stored in another subdirectory, the compiler will not
check the gnat.adc for remapping of the filenames. I would have thought
that the compiler would be capable of searching gnat.adc files stored in
other directories.
>>

That's wrong, Source_File_Name works fine for files in other directories.
You may find it useful to discuss this on chat@gnat.com, which has a 
higher density of knowledgable GNAT users than CLA!





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

end of thread, other threads:[~1997-06-26  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-25  0:00 Filenames vs Compilation Names kgamble
1997-06-26  0:00 ` Robert Dewar

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