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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c019ad9cc913bbe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-19 07:44:13 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: prichtmyer@yahoo.com (Peter Richtmyer) Newsgroups: comp.lang.ada Subject: Re: The Dreaded "Missing Subunits" Date: 19 Sep 2002 07:44:13 -0700 Organization: http://groups.google.com/ Message-ID: <1b585154.0209190644.648d0643@posting.google.com> References: <1b585154.0209121449.ef12609@posting.google.com> <3D819EE7.3A69E5EB@praxis-cs.co.uk> NNTP-Posting-Host: 164.223.72.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1032446653 12403 127.0.0.1 (19 Sep 2002 14:44:13 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Sep 2002 14:44:13 GMT Xref: archiver1.google.com comp.lang.ada:29177 Date: 2002-09-19T14:44:13+00:00 List-Id: Robert A Duff wrote in message news:... > The form of pragma Source_File_Name that lists all the compilation units > and their file names is useless, in my opinion, unless there's an > automatic way to generate them (as you say below). > Some years ago I wrote a perl script to do just that. Seems to me it is now obsolete since we can use wildcards in the pragma. But here's the "help" from the utility (abbreviated a bit - took out some project-specific info). I can forward the script to anyone who wants it. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ make_gnat_adc.pl make_gnat_adc.pl [-v] [-e] [-a] [I/path/dir]... or make_gnat_adc.pl [-h] This utility will create a 'gnat.adc' file in the current directory. The file will contain 'Source_File_Name' pragmas for all Apex-formatted Ada files in the specified 'paths'. These pragmas are for use by the Gnat Ada compiler, so that it can convert each Ada program 'unit' name into an Apex Ada File name. Once the compiler knows the file name, it can search for the correct file to compile. The 'gnat.adc' file must be in the directory from which the compile is run. And this one gnat.adc file must contain pragmas for all for all Ada source files needed that are not in the standard Gnat format. The 'paths' may come from any or all of these sources: 1) Environment variable ADA_INCLUDE_PATH. This is a standard Gnat variable that can contain multiple directories, separated by '$SEPARATOR'. Gnat uses this path when searching for Ada program units. 2) 'path' string(s) on the command line. They are entered after the -I option. Similar to the "-I" option for gnatmake, but it can contain one or directories, separated by '$SEPARATOR'. Each option string must start with a '-'. Options are: 'v' or 'V' - Verbose mode - Print debugging-level details. Default is no details. 'e' or 'E' - Use the Environment variable ADA_INCLUDE_PATH. The default is to not use it. 'a' or 'A' - Use the directory that is the same name as the current directory except that it does not have "/proj" at the beginning. 'h' or 'H' - Help. Print this Help and halt. Default is no Help. 'Ipath/dir' - A directory to be searched for Ada files. Or more than one directory, separated by the '$SEPARATOR'. the Separator character is dependant upon the operating system, where: Windows -> ';' Unix -> ':' The options may be separate (e.g.: "-v -e -I/temp -I/temp2"), or may be combined (e.g.: "-veI/temp -I/temp2"). The pragma format is: Source_File_Name (Unit_Name => unit-name, Spec_File_Name => "spec-file-name"); or Source_File_Name (Unit_Name => unit-name, Body_File_Name => "body-file-name"); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Peter