When the GNAT driver is called with a project file and a single main specified as an absolute path, the specific switches that are declared for the main source were not taken into account. This patch fixes this. The specific switches are now taken into account. Example: prj.gpr: project Prj is package Pretty_Printer is for Default_Switches ("Ada") use ("-nD"); for Switches ("pkg.ads") use ("-kU"); end Pretty_Printer; end Prj; Invoking "gnat pretty -P prj.gpr /path/to/pkg.ads" should result in gnatpp invoked with -aU, not -nD. Tested on x86_64-pc-linux-gnu, committed on trunk 2013-01-03 Vincent Celier * gnatcmd.adb (GNATCmd): If a single main has been specified as an absolute path, use its simple file name to find specific switches, instead of the absolute path.