diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:59:41 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-11-30 11:59:41 +0100 |
commit | c9df623a129fb2423546ec5ab3208b846be83d93 (patch) | |
tree | ae963440f1ba67f2811fa3dcc4a41d01b5bdf34e /gcc/ada/prj.ads | |
parent | a8fc928da333e8deb08fe0b2f8396acc63040694 (diff) | |
download | gcc-c9df623a129fb2423546ec5ab3208b846be83d93.zip gcc-c9df623a129fb2423546ec5ab3208b846be83d93.tar.gz gcc-c9df623a129fb2423546ec5ab3208b846be83d93.tar.bz2 |
[multiple changes]
2009-11-30 Thomas Quinot <quinot@adacore.com>
* osint.adb: Minor reformatting
2009-11-30 Vincent Celier <celier@adacore.com>
* makeutl.ads, makeutl.adb (Base_Name_Index_For): New function to get
the base name of a main without the extension, with an eventual source
index.
(Mains.Get_Index): New procedure to set the source index of a main
(Mains.Get_Index): New function to get the source index of a main
* prj-attr.adb: New attributes Config_Body_File_Name_Index,
Config_Spec_File_Name_Index, Multi_Unit_Object_Separator and
Multi_Unit_Switches.
* prj-nmsc.adb (Process_Compiler): Takle into account new attributes
Config_Body_File_Name_Index, Config_Spec_File_Name_Index,
Multi_Unit_Object_Separator and Multi_Unit_Switches.
Allow only one character for Multi_Unit_Object_Separator.
* prj-proc.adb (Process_Declarative_Items): Take into account the
source indexes in indexes of associative array attribute declarations.
* prj.adb (Object_Name): New function to get the object file name for
units in multi-unit sources.
* prj.ads (Language_Config): New components Multi_Unit_Switches,
Multi_Unit_Object_Separator Config_Body_Index and Config_Spec_Index.
(Object_Name): New function to get the object file name for units in
multi-unit sources.
* snames.ads-tmpl: New standard names Config_Body_File_Name_Index,
Config_Spec_File_Name_Index, Multi_Unit_Object_Separator and
Multi_Unit_Switches.
From-SVN: r154782
Diffstat (limited to 'gcc/ada/prj.ads')
-rw-r--r-- | gcc/ada/prj.ads | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/gcc/ada/prj.ads b/gcc/ada/prj.ads index 605c5bd..0a27372 100644 --- a/gcc/ada/prj.ads +++ b/gcc/ada/prj.ads @@ -160,7 +160,7 @@ package Prj is end case; end record; -- Values for variables and array elements. Default is True if the - -- current value is the default one for the variable + -- current value is the default one for the variable. Nil_Variable_Value : constant Variable_Value; -- Value of a non existing variable or array element @@ -278,8 +278,8 @@ package Prj is function Hash (Name : Name_Id) return Header_Num; function Hash (Name : File_Name_Type) return Header_Num; function Hash (Name : Path_Name_Type) return Header_Num; - function Hash (Project : Project_Id) return Header_Num; - -- Used for computing hash values for names put into above hash table + function Hash (Project : Project_Id) return Header_Num; + -- Used for computing hash values for names put into hash tables type Language_Kind is (File_Based, Unit_Based); -- Type for the kind of language. All languages are file based, except Ada @@ -433,6 +433,14 @@ package Prj is -- The list of final switches that are required as a minimum to invoke -- the compiler driver. + Multi_Unit_Switches : Name_List_Index := No_Name_List; + -- The switch(es) to indicate the index of a unit in a multi-source + -- file. + + Multi_Unit_Object_Separator : Character := ' '; + -- The string separating the base name of a source from the index of + -- the unit in a multi-source file, in the object file name. + Path_Syntax : Path_Syntax_Kind := Host; -- Value may be Canonical (Unix style) or Host (host syntax, for example -- on VMS for DEC C). @@ -515,14 +523,22 @@ package Prj is -- The template for a pragma Source_File_Name(_Project) for a specific -- file name of a body. - Config_Spec : Name_Id := No_Name; + Config_Body_Index : Name_Id := No_Name; -- The template for a pragma Source_File_Name(_Project) for a specific - -- file name of a spec. + -- file name of a body in a multi-source file. Config_Body_Pattern : Name_Id := No_Name; -- The template for a pragma Source_File_Name(_Project) for a naming -- body pattern. + Config_Spec : Name_Id := No_Name; + -- The template for a pragma Source_File_Name(_Project) for a specific + -- file name of a spec. + + Config_Spec_Index : Name_Id := No_Name; + -- The template for a pragma Source_File_Name(_Project) for a specific + -- file name of a spec in a multi-source file. + Config_Spec_Pattern : Name_Id := No_Name; -- The template for a pragma Source_File_Name(_Project) for a naming -- spec pattern. @@ -561,6 +577,8 @@ package Prj is Compiler_Driver_Path => null, Compiler_Leading_Required_Switches => No_Name_List, Compiler_Trailing_Required_Switches => No_Name_List, + Multi_Unit_Switches => No_Name_List, + Multi_Unit_Object_Separator => ' ', Path_Syntax => Canonical, Object_File_Suffix => No_Name, Object_File_Switches => No_Name_List, @@ -582,8 +600,10 @@ package Prj is Objects_Path => No_Name, Objects_Path_File => No_Name, Config_Body => No_Name, - Config_Spec => No_Name, + Config_Body_Index => No_Name, Config_Body_Pattern => No_Name, + Config_Spec => No_Name, + Config_Spec_Index => No_Name, Config_Spec_Pattern => No_Name, Config_File_Unique => False, Binder_Driver => No_File, @@ -1362,6 +1382,14 @@ package Prj is Object_File_Suffix : Name_Id := No_Name) return File_Name_Type; -- Returns the object file name corresponding to a source file name + function Object_Name + (Source_File_Name : File_Name_Type; + Source_Index : Int; + Index_Separator : Character; + Object_File_Suffix : Name_Id := No_Name) return File_Name_Type; + -- Returns the object file name corresponding to a unit in a multi-source + -- file. + function Dependency_Name (Source_File_Name : File_Name_Type; Dependency : Dependency_File_Kind) return File_Name_Type; |