6.1 Specifying Projects
A project operand identifies the name of the project to be
acted on (a simple label, denoted P below),
the name of the project-version descriptor file (P.prj),
and a root working directory (denoted D below).
In the usual case, project is just the name of a project (a
simple label), in which case P is project and D is
the current directory (.).
The full story is as follows:
- project denotes a directory. In this case
root working directory, D, is project.
D must contain a single project descriptor,
P.prj.
- Otherwise, if project has the form D/P.prj
(or P.prj), then P is the project name and D
(or .) is the root working directory.
- Otherwise, project has the form D/P (or
P), in which case P is the project name and D (or
.) is the root working directory.
Some
subcommands allow you to omit the project operand. In those
cases, it defaults to the current directory (.), so that by
the preceding rules,
there must be a single .prj file in the current directory,
which then implicitly supplies the project name.
When the directory D determined by these rules is not the
current working directory .,
the effect is as follows:
- Each of the file and directory operands (see Specifying Files and Directories) must begin with D/.
- The effect of the command is the same as if the prefix D/ had
been removed from all the file and directory options
and the project
operand, replacing any occurrences of D itself with .,
and the resulting command then executed in directory
D.