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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99d04266e293cdd1 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: File Name Rules Date: 1996/07/09 Message-ID: #1/1 X-Deja-AN: 167536577 references: <4ruegk$42b@catapult.gatech.edu> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-09T00:00:00+00:00 List-Id: iDaniel asks "I am working on some software that I want to compile with two compilers: Alsys Activada (Windows 3.11) and GNAT 3.05 (Linux). The problem I'm having is GNAT asks for the full compilation unit name, while ActivAda wants a shortened name. I don't want to go through and change all the file names, around 200 files, sheez. I've looked, but are you familiar with GNAT enough to tell/point me further?? Like some command line option (-gnatv)..?" Consulting once again my secret source of information, namely the GNAT documentation, I find a useful section called: pragma Source_File_Name ----------------------- The source file name pragma allows a program to override the normal naming convention. It is a configuration pragma, and so has the usual applicability of configuration pragmas (i.e. it applies to either an entire partition, or to all units in a compilation, or to a single unit, depending on how it is used. The form of the pragma is: pragma Source_File_Name ( [UNIT_NAME =>] unit_NAME, [BODY_FILE_NAME | SPEC_FILE_NAME] => STRING_LITERAL) The given unit name is mapped to the given file name. The identifier for the second argument is required, and indicates whether this is the file name for the spec or for the body. Any number of Source_File_Name pragmas can be put in a file called gnat.adc and will apply to compilations in the current directory. Unless the extension of the filename is ".ads", ".adb", or ".ada", you must prefix the filename with "-x ada" on the gcc command you use to compile it. That prefix applies to all subsequent filenames on the command unless you disable it with "-x none". It is well worth reading gnatinfo.txt end to end if you are a GNAT user, it is not that long and has all sorts of useful information in it! You could also use -gnatk8 and keep all your file names short all the time using the default mechanism of GNAT. The Intermetrics front end can handle any set of file names anyway with its own set of tools, so I am not sure what is causing you trouble, unless you are indeed struggling with 8+3 limitations, in which case -gnatk8 is the proper approach.