Next: Regular Expressions in gnatfind and gnatxref, Previous: gnatfind Switches, Up: The Cross-Referencing Tools gnatxref and gnatfind
Project files allow a programmer to specify how to compile its
application, where to find sources,... These files are used primarily by
the Glide Ada mode, but they can also be used by the two tools
gnatxref
and gnatfind
.
A project file name must end with .adp. If a single one is
present in the current directory, then gnatxref
and gnatfind
will
extract the information from it. If multiple project files are found, none of
them is read, and you have to use the `-p' switch to specify the one
you want to use.
The following lines can be included, even though most of them have default values which can be used in most cases. The lines can be entered in any order in the file. Except for `src_dir' and `obj_dir', you can only have one instance of each line. If you have multiple instances, only the last one is taken into account.
src_dir=DIR [default: "./"]
obj_dir=DIR [default: "./"]
comp_opt=SWITCHES [default: ""]
bind_opt=SWITCHES [default: ""]
link_opt=SWITCHES [default: ""]
main=EXECUTABLE [default: ""]
comp_cmd=COMMAND [default: "gcc -c -I${src_dir} -g -gnatq"]
make_cmd=COMMAND [default: "gnatmake ${main} -aI${src_dir} -aO${obj_dir} -g -gnatq -cargs ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}"]
run_cmd=COMMAND [default: "${main}"]
debug_cmd=COMMAND [default: "gdb ${main}"]
gnatxref
and gnatfind
only take into account the `src_dir'
and `obj_dir' lines, and ignore the others.