diff options
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r-- | gcc/ada/prj-nmsc.adb | 76 |
1 files changed, 7 insertions, 69 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index eb647df1492..54c4e4e3a44 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -8395,71 +8395,14 @@ package body Prj.Nmsc is In_Aggregate_Lib : Boolean; Data : in out Tree_Processing_Data) is - procedure Check_Aggregate - (Project : Project_Id; - Data : in out Tree_Processing_Data); - -- Check the aggregate project attributes, reject any not supported - -- attributes. - - procedure Check_Aggregated - (Project : Project_Id; - Data : in out Tree_Processing_Data); - -- Check aggregated projects which should not be externally built. - -- What is Data??? if same as outer Data, why passed??? - -- What exact check is performed here??? Seems a bad idea to have - -- two procedures with such close names ??? - - --------------------- - -- Check_Aggregate -- - --------------------- - - procedure Check_Aggregate - (Project : Project_Id; - Data : in out Tree_Processing_Data) - is - procedure Check_Not_Defined (Name : Name_Id); - -- Report an error if Var is defined - - ----------------------- - -- Check_Not_Defined -- - ----------------------- - - procedure Check_Not_Defined (Name : Name_Id) is - Var : constant Prj.Variable_Value := - Prj.Util.Value_Of - (Name, Project.Decl.Attributes, Data.Tree.Shared); - begin - if not Var.Default then - Error_Msg_Name_1 := Name; - Error_Msg - (Data.Flags, "wrong attribute %% in aggregate library", - Var.Location, Project); - end if; - end Check_Not_Defined; - - -- Start of processing for Check_Aggregate - - begin - Check_Not_Defined (Snames.Name_Library_Dir); - Check_Not_Defined (Snames.Name_Library_Interface); - Check_Not_Defined (Snames.Name_Library_Name); - Check_Not_Defined (Snames.Name_Library_Ali_Dir); - Check_Not_Defined (Snames.Name_Library_Src_Dir); - Check_Not_Defined (Snames.Name_Library_Options); - Check_Not_Defined (Snames.Name_Library_Standalone); - Check_Not_Defined (Snames.Name_Library_Kind); - Check_Not_Defined (Snames.Name_Leading_Library_Options); - Check_Not_Defined (Snames.Name_Library_Version); - end Check_Aggregate; + procedure Check_Aggregated; + -- Check aggregated projects which should not be externally built ---------------------- -- Check_Aggregated -- ---------------------- - procedure Check_Aggregated - (Project : Project_Id; - Data : in out Tree_Processing_Data) - is + procedure Check_Aggregated is L : Aggregated_Project_List; begin @@ -8478,7 +8421,7 @@ package body Prj.Nmsc is Error_Msg_Name_1 := L.Project.Display_Name; Error_Msg (Data.Flags, - "cannot aggregate externally build library %%", + "cannot aggregate externally built project %%", Var.Location, Project); end if; end; @@ -8504,10 +8447,10 @@ package body Prj.Nmsc is case Project.Qualifier is when Aggregate => - Check_Aggregated (Project, Data); + Check_Aggregated; when Aggregate_Library => - Check_Aggregated (Project, Data); + Check_Aggregated; if Project.Object_Directory = No_Path_Information then Project.Object_Directory := Project.Directory; @@ -8532,12 +8475,7 @@ package body Prj.Nmsc is Check_Configuration (Project, Data); - -- For aggregate project check no library attributes are defined - - if Project.Qualifier = Aggregate then - Check_Aggregate (Project, Data); - - else + if Project.Qualifier /= Aggregate then Check_Library_Attributes (Project, Data); Check_Package_Naming (Project, Data); |