Previous: GUI Editor, Up: Project files
The following variables can be defined in a project file; some can also be defined in lisp variables.
To set a project variable that is a list, specify each element of the list on a separate line in the project file.
Any project variable can be referenced in other project variables,
using a shell-like notation. For instance, if the variable
comp_cmd contains ${comp_opt}, the value of the
comp_opt variable will be substituted when comp_cmd is
used.
Most project variables have defaults that can be changed by setting lisp variables; the table below identifies the lisp variable for each project variable. Lisp variables corresponding to project variables that are lists are lisp lists.
Here is the list of variables. In the default values, the current
directory "." is the project file directory.
build_dir [default: "."]src_dir [default: "."]obj_dir [default: "."]The compiler commands must place the `.ali' files in one of these
directories; the default commands do that.
casing [default: ("~/.emacs_case_exceptions")ada-case-exception-file for more info.
Lisp variable: ada-case-exception-file.
comp_opt [default: "-gnatq -gnatQ"]If source code for the project is in multiple directories, the appropriate compiler options must be added here. Set source search path for examples of this. Alternately, GNAT project files may be used; Use GNAT project file.
Lisp variable: ada-prj-default-comp-opt.
bind_opt [default: ""]Lisp variable: ada-prj-default-bind-opt.
link_opt [default: ""]Lisp variable: ada-prj-default-link-opt.
gnatmake_opt [default: "-g"]If a GNAT project file is used (for example project.gpr), this
option should be set to -Pproject.gpr.
Lisp variable: ada-prj-default-gnatmake-opt.
gnatfind_opt [default: "-rf"]Lisp variable: ada-prj-gnatfind-switches.
main [default: current file]main_unit [default: current Ada unit]cross_prefix [default: ""]remote_machine [default: ""]comp_cmd [default: "${cross_prefix}gnatmake -u -c ${gnatmake_opt} ${full_current} -cargs ${comp_opt}"]full_current.
Lisp variable: ada-prj-default-comp-cmd.
check_cmd [default: "${cross_prefix}gnatmake -u -c -gnatc ${gnatmake_opt} ${full_current} -cargs ${comp_opt}"]full_current.
Lisp variable: ada-prj-default-check-cmd
make_cmd [default: "${cross_prefix}gnatmake -o ${main} ${main_unit} ${gnatmake_opt} -cargs ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}"]Lisp variable: ada-prj-default-make-cmd.
run_cmd [default: "./${main}"]debug_pre_cmd [default: "cd ${build_dir}"]debug_cmd.
debug_cmd [default: "${cross_prefix}gdb ${main}"]Lisp variable: ada-prj-default-debugger.
debug_post_cmd [default: ""]debug_cmd.