summaryrefslogtreecommitdiff
path: root/gcc/ada/prj.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-11 01:02:03 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-11 01:02:03 +0000
commit42f613d54031a7d0859959cee3a8b311ec444d74 (patch)
treea7dd7bd90b833295e4cdd24ca2443617ba4bd34c /gcc/ada/prj.adb
parentd775516a4f89655206d1b5b9d64cee6fbe979080 (diff)
downloadgcc-42f613d54031a7d0859959cee3a8b311ec444d74.tar.gz
* make.adb:
(Add_Switches): reflect the changes for the switches attributes Default_Switches indexed by the programming language, Switches indexed by the file name. (Collect_Arguments_And_Compile): Idem. Reflect the attribute name changes. * prj-attr.adb: (Initialisation_Data): Change the names of some packages and attributes. (Initialize): process case insensitive associative arrays. * prj-attr.ads: (Attribute_Kind): Remove Both, add Case_Insensitive_Associative_Array. * prj-dect.adb: (Parse_Attribute_Declaration): For case insensitive associative arrays, set the index string to lower case. * prj-env.adb: Reflect the changes of the project attributes. * prj-nmsc.adb: Replace Check_Naming_Scheme by Ada_Check and Language_Independent_Check. * prj-nmsc.ads: Replaced Check_Naming_Scheme by 2 procedures: Ada_Check and Language_Independent_Check. * prj-proc.adb: (Process_Declarative_Items): For case-insensitive associative arrays, set the index string to lower case. (Recursive_Check): Call Prj.Nmsc.Ada_Check, instead of Prj.Nmsc.Check_Naming_Scheme. * prj-tree.adb: (Case_Insensitive): New function (Set_Case_Insensitive): New procedure * prj-tree.ads: (Case_Insensitive): New function (Set_Case_Insensitive): New procedure (Project_Node_Record): New flag Case_Insensitive. * prj-util.adb: (Value_Of): new function to get the string value of a single string variable or attribute. * prj-util.ads: (Value_Of): new function to get the string value of a single string variable or attribute. * prj.adb: (Ada_Default_Spec_Suffix): New function (Ada_Default_Impl_Suffix): New function Change definitions of several constants to reflect new components of record types. * prj.ads: (Naming_Data): Change several components to reflect new elements of naming schemes. (Project_Data): New flags Sources_Present and Language_Independent_Checked. (Ada_Default_Spec_Suffix): New function. (Ada_Default_Impl_Suffix): New function. * snames.ads: Modification of predefined names for project manager: added Implementation, Specification_Exceptions, Implementation_Exceptions, Specification_Suffix, Implementation_Suffix, Separate_Suffix, Default_Switches, _Languages, Builder, Cross_Reference, Finder. Removed Body_Part, Specification_Append, Body_Append, Separate_Append, Gnatmake, Gnatxref, Gnatfind, Gnatbind, Gnatlink. * prj.ads: (Ada_Default_Spec_Suffix, Ada_Default_Impl_Suffix): Add comments. * prj-nmsc.adb (Ada_Check): Test that Separate_Suffix is defaulted, not that it is Nil_Variable_Value. * prj.ads: Add ??? for uncommented declarations git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46169 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj.adb')
-rw-r--r--gcc/ada/prj.adb140
1 files changed, 81 insertions, 59 deletions
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index 8e302117917..5f4cf46ef8b 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.16 $
+-- $Revision$
-- --
-- Copyright (C) 2001 Free Software Foundation, Inc. --
-- --
@@ -30,7 +30,6 @@ with Ada.Characters.Handling; use Ada.Characters.Handling;
with Errout; use Errout;
with GNAT.OS_Lib; use GNAT.OS_Lib;
with Namet; use Namet;
-with Osint; use Osint;
with Prj.Attr;
with Prj.Com;
with Prj.Env;
@@ -42,7 +41,10 @@ with Snames; use Snames;
package body Prj is
- The_Empty_String : String_Id;
+ The_Empty_String : String_Id;
+
+ Default_Ada_Spec_Suffix : Name_Id := No_Name;
+ Default_Ada_Impl_Suffix : Name_Id := No_Name;
subtype Known_Casing is Casing_Type range All_Upper_Case .. Mixed_Case;
@@ -55,52 +57,74 @@ package body Prj is
Standard_Dot_Replacement : constant Name_Id :=
First_Name_Id + Character'Pos ('-');
- Standard_Specification_Append : Name_Id;
- Standard_Body_Append : Name_Id;
Std_Naming_Data : Naming_Data :=
- (Dot_Replacement => Standard_Dot_Replacement,
- Dot_Repl_Loc => No_Location,
- Casing => All_Lower_Case,
- Specification_Append => No_Name,
- Spec_Append_Loc => No_Location,
- Body_Append => No_Name,
- Body_Append_Loc => No_Location,
- Separate_Append => No_Name,
- Sep_Append_Loc => No_Location,
- Specifications => No_Array_Element,
- Bodies => No_Array_Element);
-
- Project_Empty : Project_Data :=
- (First_Referred_By => No_Project,
- Name => No_Name,
- Path_Name => No_Name,
- Location => No_Location,
- Directory => No_Name,
- File_Name => No_Name,
- Library => False,
- Library_Dir => No_Name,
- Library_Name => No_Name,
- Library_Kind => Static,
- Lib_Internal_Name => No_Name,
- Lib_Elaboration => False,
- Sources => Nil_String,
- Source_Dirs => Nil_String,
- Object_Directory => No_Name,
- Modifies => No_Project,
- Modified_By => No_Project,
- Naming => Std_Naming_Data,
- Decl => No_Declarations,
- Imported_Projects => Empty_Project_List,
- Include_Path => null,
- Objects_Path => null,
- Config_File_Name => No_Name,
- Config_File_Temp => False,
- Config_Checked => False,
- Checked => False,
- Seen => False,
- Flag1 => False,
- Flag2 => False);
+ (Current_Language => No_Name,
+ Dot_Replacement => Standard_Dot_Replacement,
+ Dot_Repl_Loc => No_Location,
+ Casing => All_Lower_Case,
+ Specification_Suffix => No_Array_Element,
+ Current_Spec_Suffix => No_Name,
+ Spec_Suffix_Loc => No_Location,
+ Implementation_Suffix => No_Array_Element,
+ Current_Impl_Suffix => No_Name,
+ Impl_Suffix_Loc => No_Location,
+ Separate_Suffix => No_Name,
+ Sep_Suffix_Loc => No_Location,
+ Specifications => No_Array_Element,
+ Bodies => No_Array_Element,
+ Specification_Exceptions => No_Array_Element,
+ Implementation_Exceptions => No_Array_Element);
+
+ Project_Empty : constant Project_Data :=
+ (First_Referred_By => No_Project,
+ Name => No_Name,
+ Path_Name => No_Name,
+ Location => No_Location,
+ Directory => No_Name,
+ Library => False,
+ Library_Dir => No_Name,
+ Library_Name => No_Name,
+ Library_Kind => Static,
+ Lib_Internal_Name => No_Name,
+ Lib_Elaboration => False,
+ Sources_Present => True,
+ Sources => Nil_String,
+ Source_Dirs => Nil_String,
+ Object_Directory => No_Name,
+ Modifies => No_Project,
+ Modified_By => No_Project,
+ Naming => Std_Naming_Data,
+ Decl => No_Declarations,
+ Imported_Projects => Empty_Project_List,
+ Include_Path => null,
+ Objects_Path => null,
+ Config_File_Name => No_Name,
+ Config_File_Temp => False,
+ Config_Checked => False,
+ Language_Independent_Checked => False,
+ Checked => False,
+ Seen => False,
+ Flag1 => False,
+ Flag2 => False);
+
+ -----------------------------
+ -- Ada_Default_Spec_Suffix --
+ -----------------------------
+
+ function Ada_Default_Spec_Suffix return Name_Id is
+ begin
+ return Default_Ada_Spec_Suffix;
+ end Ada_Default_Spec_Suffix;
+
+ -----------------------------
+ -- Ada_Default_Impl_Suffix --
+ -----------------------------
+
+ function Ada_Default_Impl_Suffix return Name_Id is
+ begin
+ return Default_Ada_Impl_Suffix;
+ end Ada_Default_Impl_Suffix;
-------------------
-- Empty_Project --
@@ -192,15 +216,13 @@ package body Prj is
The_Empty_String := End_String;
Name_Len := 4;
Name_Buffer (1 .. 4) := ".ads";
- Canonical_Case_File_Name (Name_Buffer (1 .. 4));
- Standard_Specification_Append := Name_Find;
- Name_Buffer (4) := 'b';
- Canonical_Case_File_Name (Name_Buffer (1 .. 4));
- Standard_Body_Append := Name_Find;
- Std_Naming_Data.Specification_Append := Standard_Specification_Append;
- Std_Naming_Data.Body_Append := Standard_Body_Append;
- Std_Naming_Data.Separate_Append := Standard_Body_Append;
- Project_Empty.Naming := Std_Naming_Data;
+ Default_Ada_Spec_Suffix := Name_Find;
+ Name_Len := 4;
+ Name_Buffer (1 .. 4) := ".adb";
+ Default_Ada_Impl_Suffix := Name_Find;
+ Std_Naming_Data.Current_Spec_Suffix := Default_Ada_Spec_Suffix;
+ Std_Naming_Data.Current_Impl_Suffix := Default_Ada_Impl_Suffix;
+ Std_Naming_Data.Separate_Suffix := Default_Ada_Impl_Suffix;
Prj.Env.Initialize;
Prj.Attr.Initialize;
Set_Name_Table_Byte (Name_Project, Token_Type'Pos (Tok_Project));
@@ -236,9 +258,9 @@ package body Prj is
begin
return Left.Dot_Replacement = Right.Dot_Replacement
and then Left.Casing = Right.Casing
- and then Left.Specification_Append = Right.Specification_Append
- and then Left.Body_Append = Right.Body_Append
- and then Left.Separate_Append = Right.Separate_Append;
+ and then Left.Current_Spec_Suffix = Right.Current_Spec_Suffix
+ and then Left.Current_Impl_Suffix = Right.Current_Impl_Suffix
+ and then Left.Separate_Suffix = Right.Separate_Suffix;
end Same_Naming_Scheme;
----------