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


Untitled Document

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

10.4.3 Source Directories

The source directories of a project are specified by the project file attribute Source_Dirs.

This attribute's value is a string list. If the attribute is not given an explicit value, then there is only one source directory, the one where the project file resides.

A Source_Dirs attribute that is explicitly defined to be the empty list, as in

 
    for Source_Dirs use ();

indicates that the project contains no source files.

Otherwise, each string in the string list designates one or more source directories.

 
   for Source_Dirs use ("sources", "test/drivers");

If a string in the list ends with "/**", then the directory whose path name precedes the two asterisks, as well as all its subdirectories (recursively), are source directories.

 
   for Source_Dirs use ("/system/sources/**");

Here the directory /system/sources and all of its subdirectories (recursively) are source directories.

To specify that the source directories are the directory of the project file and all of its subdirectories, you can declare Source_Dirs as follows:
 
   for Source_Dirs use ("./**");

Each of the source directories must exist and be readable.


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