www.delorie.com/gnu/docs/gcc/gnat_ug_95.html   search  
 
Buy the book!


Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.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.

When the source file names do not follow the standard GNAT default file naming conventions, the GNAT compiler must be given additional information through a configuration pragmas file (see 8. Configuration Pragmas) or a project file. When the non standard file naming conventions are well-defined, a small number of pragmas Source_File_Name specifying a naming pattern (see 2.5 Alternative File Naming Schemes) may be sufficient. However, if the file naming conventions are irregular or arbitrary, a number of pragma Source_File_Name for individual compilation units must be defined. To help maintain the correspondence between compilation unit names and source file names within the compiler, GNAT provides a tool gnatname to generate the required pragmas for a set of files.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003