comp.lang.ada
 help / color / mirror / Atom feed
From: comar@cs.nyu.edu (Cyrille Comar)
Subject: Re: Naive question about system dependencies
Date: 19 Sep 1994 10:39:38 -0400
Date: 1994-09-19T10:39:38-04:00	[thread overview]
Message-ID: <35k7ra$o1p@lang8.cs.nyu.edu> (raw)
In-Reply-To: 35jupm$dkq@theopolis.orl.mmc.com

dennison@romulus23.DAB.GE.COM (Ted Dennison) writes:
: In article <35f559$mad@info.epfl.ch>, weber@lglsun.epfl.ch (Mats Weber) writes:
: |> sql_interface.ads                 (common package spec)
: |> sql_interface-oracle-vms.adb      (body for Oracle under VMS)
: |> sql_interface-sybase-unix.adb     (body for Sybase under UNIX)
: |> 
: |> Despite the amount of code duplication, I prefer this to a preprocessor
: |> approach.
: 
: This won't work under GNAT. GNAT doesn't allow you to use "a good file naming
: convention", you have to use theirs.
: 
: T.E.D.

I don't understand this kind of comment... GNAT is a compiler, nothing else.
you can always write tools around it to do what you want...
In this case a 2 line script will do the job.
      gnatchop whatever_fancy_name_you_want tmp
      gcc tmp/*.ad[sb]
Or you can include the name changes in your Makefile...

It is true that the simplest approach with gnat is to use different
directories. In the previous case :

sql_interface.ads                 (common package spec)
oracle-vms/sql_interface.adb      (body for Oracle under VMS)
sybase-unix/sql_interface.adb     (body for Sybase under UNIX)

and then use either environment variables or -I (not implemented yet) to find
the right body for your spec. This is the simplest approach but it is in NO WAY
required by GNAT...
------------------------------------------------------------------------
Cyrille Comar,                                  E-mail: comar@cs.nyu.edu
Gnat Project                                    US phone: (212) 998-3489

-- 
------------------------------------------------------------------------
Cyrille Comar,                                  E-mail: comar@cs.nyu.edu
Gnat Project                                    US phone: (212) 998-3489




  reply	other threads:[~1994-09-19 14:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-15  6:32 Naive question about system dependencies Howard Holm
1994-09-16 17:28 ` Tucker Taft
1994-09-17 16:23   ` Mats Weber
1994-09-19 12:05     ` Ted Dennison
1994-09-19 14:39       ` Cyrille Comar [this message]
1994-09-19 15:00       ` Norman H. Cohen
1994-09-20  9:02       ` Stephen J Bevan
     [not found]     ` <85B716C4188@annwfn.com>
1994-09-22 13:33       ` David Kehs
1994-09-22 14:15       ` Robert Dewar
1994-09-23  4:34         ` R. William Beckwith
1994-09-22 14:54       ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1994-09-19 14:48 Bob Crispen
replies disabled

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