This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] New read-only project-level attribute Project_Dir


A new read-only project-level attribute Project_Dir is created. Its
value is the path name of the project directory.
Using this new attribute it is possible to specify global path in
other projects, as in:

project Common is
   for Source_Files use ();
   GCPF := Common'Project_Dir & "/gnat.adc";
end Common;

with ".../common.gpr";
project Prj is
   for Main use ("main.adb");

   package Builder is
      for Global_Configuration_Pragmas use Common.GCPF;
   end Builder;
end Prj;

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-04-08  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: New read-only project-level attribute Project_Dir

	* prj-proc.adb (Add_Attributes): New parameter Project_Dir, value of
	read-only attribute of the same name.
	(Process_Declarative_Items): Call Add_Attributes with Project_Dir
	(Recursive_Process): Ditto

	* snames.adb: Add new standard name Project_Dir

	* snames.ads: Add new standard name Project_Dir

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]