Next: , Previous: Package Renamings, Up: Project File Reference


13.15 Projects

A project file specifies a set of rules for constructing a software system. A project file can be self-contained, or depend on other project files. Dependencies are expressed through a context clause that names other projects.

Syntax:

     project ::=
       context_clause project_declaration
     
     project_declaration ::=
       simple_project_declaration | project_extension
     
     simple_project_declaration ::=
       project <project_>simple_name is
         {declarative_item}
       end <project_>simple_name;
     
     context_clause ::=
       {with_clause}
     
     with_clause ::=
       [limited] with path_name { , path_name } ;
     
     path_name ::=
        string_literal

A path name denotes a project file. A path name can be absolute or relative. An absolute path name includes a sequence of directories, in the syntax of the host operating system, that identifies uniquely the project file in the file system. A relative path name identifies the project file, relative to the directory that contains the current project, or relative to a directory listed in the environment variable ADA_PROJECT_PATH. Path names are case sensitive if file names in the host operating system are case sensitive.

The syntax of the environment variable ADA_PROJECT_PATH is a list of directory names separated by colons (semicolons on Windows).

A given project name can appear only once in a context_clause.

It is illegal for a project imported by a context clause to refer, directly or indirectly, to the project in which this context clause appears (the dependency graph cannot contain cycles), except when one of the with_clause in the cycle is a limited with.