From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d694b5818a5102b1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-20 10:16:27 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: comar@cs.nyu.edu (Cyrille Comar) Newsgroups: comp.lang.ada Subject: Re: Naive question about system dependencies Date: 19 Sep 1994 10:39:38 -0400 Organization: Courant Institute of Mathematical Sciences Distribution: world Message-ID: <35k7ra$o1p@lang8.cs.nyu.edu> References: <35jupm$dkq@theopolis.orl.mmc.com> NNTP-Posting-Host: lang8.cs.nyu.edu Date: 1994-09-19T10:39:38-04:00 List-Id: 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