Next: Source File Names, Previous: Exec Directory, Up: Objects and Sources in Project Files
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.