comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: matrix package with Ada
Date: Tue, 13 Jul 2010 20:00:28 +0200
Date: 2010-07-13T20:00:29+02:00	[thread overview]
Message-ID: <4c3ca9bd$0$6879$9b4e6d93@newsspool2.arcor-online.net> (raw)
In-Reply-To: <ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com>

On 13.07.10 19:43, Ada novice wrote:

> Yes, I don't understand why it hangs. I've tried also the package from
> 83 but there the files are named "ada" which I've converted to "adb"
> but then it becomes a big mess to know which should be "adb" and which
> ones should be "ads" given the large amount of files in the library. I
> didn't know that Ada files had the extension "ada" in the past.

Ada source files can end in "ada", today, or in just
anything.  You can use GNAT's gnatname and gnatchop to convert
Ada source files to Ada source files that have one compilation unit
per file, ending in "ads" for specs and in "adb" for bodies.
This is how GNAT/GCC wants them.

Alternatively, you can write a ton of pragmas telling GNAT
where to find a unit, or add this info to a project file IIRC.

The "GNAT [GPL] User's Guide" has some background information.

"10 Handling Arbitrary File Naming Conventions Using `gnatname'
**************************************************************

"10.1 Arbitrary File Naming Conventions
======================================

"The GNAT compiler must be able to know the source file name of a
compilation unit.  When using the standard GNAT default file naming
conventions (`.ads' for specs, `.adb' for bodies), the GNAT compiler
does not need additional information.

"..."

Something like this should work:

mkdir for-gnat
cd for-gnat
for file in <list-of-original-files> loop
   gnatchop [-r] -w  file
end loop



  parent reply	other threads:[~2010-07-13 18:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10 13:25 matrix package with Ada fitta
2010-07-10 13:46 ` MRE
2010-07-10 15:42   ` fitta
2010-07-10 18:34     ` tmoran
2010-07-10 18:54       ` Simon Wright
2010-07-10 20:23     ` Gautier write-only
2010-07-14  2:02     ` robin
2010-07-10 20:22 ` Gautier write-only
2010-07-12  1:58   ` Jerry
2010-07-12 13:38   ` Ada novice
2010-07-12 15:13     ` jonathan
2010-07-12 19:13       ` Ada novice
2010-07-12 20:13       ` Simon Wright
2010-07-12 21:09         ` jonathan
2010-07-13  7:07           ` Ada novice
2010-07-13 14:27             ` jonathan
     [not found]               ` <ec73f176-876e-4bcf-ab11-eed852129d34@x21g2000yqa.googlegroups.com>
2010-07-13 17:59                 ` Jeffrey R. Carter
2010-07-13 18:00                 ` Georg Bauhaus [this message]
2010-07-13 18:26                   ` Ada novice
2010-07-19 22:34                 ` Randy Brukardt
2010-07-20  7:27                   ` Dmitry A. Kazakov
2010-07-25 19:15                   ` Ada novice
     [not found]                   ` <5f0082b8-7688-4422-be38-72f1c60be539@d8g2000yqf.googlegroups.com>
2010-07-25 19:39                     ` Nasser M. Abbasi
2010-07-13 19:11           ` Simon Wright
2010-07-13 20:43             ` Ada novice
2010-07-14 18:55               ` Simon Wright
2010-07-12 20:59     ` Simon Wright
2010-07-13 16:40   ` Warren
2010-07-27 22:10   ` jonathan
2010-07-27 22:40     ` jonathan
2010-07-28  0:51     ` jonathan
2010-07-12  2:04 ` Jerry
2010-07-12  8:52   ` Ada novice
replies disabled

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