Environment Variables
The following environment variables are read by GPR tools. Variables that affect project file search paths are consulted by all project-based tools (GPRbuild, GPRclean, GPRinstall, GPRls, GPRinspect); tool-specific variables are noted.
Project search path
- GPR_PROJECT_PATH_FILE
Path to a text file containing project search directories, one per line. Directories listed in this file are added to the project search path before
GPR_PROJECT_PATHandADA_PROJECT_PATH.
- GPR_PROJECT_PATH
Colon-separated (Unix) or semicolon-separated (Windows) list of directories to search for project files referenced by
withclauses. Takes precedence overADA_PROJECT_PATH.
- ADA_PROJECT_PATH
Legacy equivalent of
GPR_PROJECT_PATH, accepted for backward compatibility. Consulted afterGPR_PROJECT_PATH.
The search order when resolving a project name is: the directory of the
importing project, then GPR_PROJECT_PATH_FILE directories, then
GPR_PROJECT_PATH, then ADA_PROJECT_PATH, then the
default project path of the active toolchain.
Configuration
- GPR_CONFIG
Path to a configuration project (
.cgpr) file or to a directory containing one. When set to a directory, the tool looks for a file named<target>.cgpr(ordefault.cgprfor the native target) inside it. Takes precedence over the default auto-configuration mechanism but is overridden by an explicit--configswitch on the command line.
- GPR_RUNTIME_PATH
Colon-separated list of directories searched when resolving a relative Ada runtime path specified in the configuration project. Used by GPRbuild, GPRclean, GPRinstall, and GPRconfig.
Build engine
- GNAT_GPR_ENGINE
Selects the GPRbuild engine. Accepted values:
1orlegacyfor the original engine;2ornewfor GPRbuild2 (the DAG-based engine). The--gpr=n command-line switch takes precedence over this variable. See GPRbuild Reference for details.
Compiler discovery
- PATH
The standard executable search path. GPRconfig searches
PATHfor compiler executables during auto-configuration.
- MAKEFLAGS
Parsed by GPRbuild2 to detect a GNU Make jobserver token pipe when GPRbuild is invoked as a sub-make. If jobserver authentication details are present, GPRbuild2 coordinates its parallel job limit with the enclosing make process automatically. Users do not normally set this variable directly; it is set by make.