Commit c8c41617 by Robert Dewar Committed by Arnaud Charlet

makeutl.adb, [...]: Minor reformatting.

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* makeutl.adb, makeutl.ads, prj-proc.adb, prj.adb, prj.ads: Minor
	reformatting.

From-SVN: r154783
parent c9df623a
2009-11-30 Robert Dewar <dewar@adacore.com>
* makeutl.adb, makeutl.ads, prj-proc.adb, prj.adb, prj.ads: Minor
reformatting.
2009-11-30 Thomas Quinot <quinot@adacore.com> 2009-11-30 Thomas Quinot <quinot@adacore.com>
* osint.adb: Minor reformatting * osint.adb: Minor reformatting
......
...@@ -167,12 +167,13 @@ package body Makeutl is ...@@ -167,12 +167,13 @@ package body Makeutl is
Index_Separator : Character) return File_Name_Type Index_Separator : Character) return File_Name_Type
is is
Result : File_Name_Type; Result : File_Name_Type;
begin begin
Name_Len := 0; Name_Len := 0;
Add_Str_To_Name_Buffer (Base_Name (Main)); Add_Str_To_Name_Buffer (Base_Name (Main));
-- Remove the extension, if any, that is the last part of the base -- Remove the extension, if any, that is the last part of the base name
-- name starting with a dot and following some characters. -- starting with a dot and following some characters.
for J in reverse 2 .. Name_Len loop for J in reverse 2 .. Name_Len loop
if Name_Buffer (J) = '.' then if Name_Buffer (J) = '.' then
...@@ -192,6 +193,7 @@ package body Makeutl is ...@@ -192,6 +193,7 @@ package body Makeutl is
Add_Str_To_Name_Buffer (Img (2 .. Img'Last)); Add_Str_To_Name_Buffer (Img (2 .. Img'Last));
end; end;
end if; end if;
Result := Name_Find; Result := Name_Find;
return Result; return Result;
end Base_Name_Index_For; end Base_Name_Index_For;
......
...@@ -66,8 +66,8 @@ package Makeutl is ...@@ -66,8 +66,8 @@ package Makeutl is
(Main : String; (Main : String;
Main_Index : Int; Main_Index : Int;
Index_Separator : Character) return File_Name_Type; Index_Separator : Character) return File_Name_Type;
-- Returns the base name of Main, without the extension, plus the -- Returns the base name of Main, without the extension, followed by the
-- Index_Separator followed by the Main_Index, if Main_Index is not 0. -- Index_Separator followed by the Main_Index if it is non-zero.
function Executable_Prefix_Path return String; function Executable_Prefix_Path return String;
-- Return the absolute path parent directory of the directory where the -- Return the absolute path parent directory of the directory where the
...@@ -87,9 +87,9 @@ package Makeutl is ...@@ -87,9 +87,9 @@ package Makeutl is
-- one of its source. Returns False otherwise. -- one of its source. Returns False otherwise.
function Check_Source_Info_In_ALI (The_ALI : ALI.ALI_Id) return Boolean; function Check_Source_Info_In_ALI (The_ALI : ALI.ALI_Id) return Boolean;
-- Check whether all file references in ALI are still valid (ie the -- Check whether all file references in ALI are still valid (i.e. the
-- source files are still associated with the same units). Return True -- source files are still associated with the same units). Return True
-- if everything is still valid -- if everything is still valid.
function Is_External_Assignment function Is_External_Assignment
(Tree : Prj.Tree.Project_Node_Tree_Ref; (Tree : Prj.Tree.Project_Node_Tree_Ref;
...@@ -121,11 +121,11 @@ package Makeutl is ...@@ -121,11 +121,11 @@ package Makeutl is
S2 : String := ""; S2 : String := "";
Prefix : String := " -> "; Prefix : String := " -> ";
Minimum_Verbosity : Opt.Verbosity_Level_Type := Opt.Low); Minimum_Verbosity : Opt.Verbosity_Level_Type := Opt.Low);
-- If the verbose flag (Verbose_Mode) is set and the verbosity level is -- If the verbose flag (Verbose_Mode) is set and the verbosity level is at
-- at least equal to Minimum_Verbosity, then print Prefix to standard -- least equal to Minimum_Verbosity, then print Prefix to standard output
-- output followed by N1 and S1. If N2 /= No_Name then N2 is printed after -- followed by N1 and S1. If N2 /= No_Name then N2 is printed after S1. S2
-- S1. S2 is printed last. Both N1 and N2 are printed in quotation marks. -- is printed last. Both N1 and N2 are printed in quotation marks. The two
-- The two forms differ only in taking Name_Id or File_name_Type arguments. -- forms differ only in taking Name_Id or File_name_Type arguments.
function Linker_Options_Switches function Linker_Options_Switches
(Project : Project_Id; (Project : Project_Id;
...@@ -142,10 +142,30 @@ package Makeutl is ...@@ -142,10 +142,30 @@ package Makeutl is
-- Find the index of a unit in a source file. Return zero if the file is -- Find the index of a unit in a source file. Return zero if the file is
-- not a multi-unit source file. -- not a multi-unit source file.
package Mains is procedure Test_If_Relative_Path
(Switch : in out String_Access;
Parent : String;
Including_L_Switch : Boolean := True;
Including_Non_Switch : Boolean := True;
Including_RTS : Boolean := False);
-- Test if Switch is a relative search path switch. If it is, fail if
-- Parent is the empty string, otherwise prepend the path with Parent.
-- This subprogram is only called when using project files. For gnatbind
-- switches, Including_L_Switch is False, because the argument of the -L
-- switch is not a path. If Including_RTS is True, process also switches
-- --RTS=.
-- Mains are stored in a table. An index is used to retrieve the mains function Path_Or_File_Name (Path : Path_Name_Type) return String;
-- from the table. -- Returns a file name if -df is used, otherwise return a path name
-----------
-- Mains --
-----------
-- Mains are stored in a table. An index is used to retrieve the mains
-- from the table.
package Mains is
procedure Add_Main (Name : String); procedure Add_Main (Name : String);
-- Add one main to the table -- Add one main to the table
...@@ -180,22 +200,6 @@ package Makeutl is ...@@ -180,22 +200,6 @@ package Makeutl is
end Mains; end Mains;
procedure Test_If_Relative_Path
(Switch : in out String_Access;
Parent : String;
Including_L_Switch : Boolean := True;
Including_Non_Switch : Boolean := True;
Including_RTS : Boolean := False);
-- Test if Switch is a relative search path switch. If it is, fail if
-- Parent is the empty string, otherwise prepend the path with Parent.
-- This subprogram is only called when using project files. For gnatbind
-- switches, Including_L_Switch is False, because the argument of the -L
-- switch is not a path. If Including_RTS is True, process also switches
-- --RTS=.
function Path_Or_File_Name (Path : Path_Name_Type) return String;
-- Returns a file name if -df is used, otherwise return a path name
---------------------- ----------------------
-- Marking Routines -- -- Marking Routines --
---------------------- ----------------------
......
...@@ -1869,12 +1869,16 @@ package body Prj.Proc is ...@@ -1869,12 +1869,16 @@ package body Prj.Proc is
else else
declare declare
Index_Name : Name_Id := Index_Name : Name_Id :=
Associative_Array_Index_Of Associative_Array_Index_Of
(Current_Item, From_Project_Node_Tree); (Current_Item,
From_Project_Node_Tree);
Source_Index : constant Int := Source_Index : constant Int :=
Source_Index_Of Source_Index_Of
(Current_Item, From_Project_Node_Tree); (Current_Item,
The_Array : Array_Id; From_Project_Node_Tree);
The_Array : Array_Id;
The_Array_Element : Array_Element_Id := The_Array_Element : Array_Element_Id :=
No_Array_Element; No_Array_Element;
...@@ -1892,9 +1896,9 @@ package body Prj.Proc is ...@@ -1892,9 +1896,9 @@ package body Prj.Proc is
if Pkg /= No_Package then if Pkg /= No_Package then
The_Array := The_Array :=
In_Tree.Packages.Table (Pkg).Decl.Arrays; In_Tree.Packages.Table (Pkg).Decl.Arrays;
else else
The_Array := Project.Decl.Arrays; The_Array :=
Project.Decl.Arrays;
end if; end if;
while while
...@@ -1903,8 +1907,8 @@ package body Prj.Proc is ...@@ -1903,8 +1907,8 @@ package body Prj.Proc is
In_Tree.Arrays.Table (The_Array).Name /= In_Tree.Arrays.Table (The_Array).Name /=
Current_Item_Name Current_Item_Name
loop loop
The_Array := In_Tree.Arrays.Table The_Array :=
(The_Array).Next; In_Tree.Arrays.Table (The_Array).Next;
end loop; end loop;
-- If the array cannot be found, create a new entry -- If the array cannot be found, create a new entry
...@@ -1952,7 +1956,7 @@ package body Prj.Proc is ...@@ -1952,7 +1956,7 @@ package body Prj.Proc is
and then and then
(In_Tree.Array_Elements.Table (In_Tree.Array_Elements.Table
(The_Array_Element).Index /= Index_Name (The_Array_Element).Index /= Index_Name
or else or else
In_Tree.Array_Elements.Table In_Tree.Array_Elements.Table
(The_Array_Element).Src_Index /= Source_Index) (The_Array_Element).Src_Index /= Source_Index)
loop loop
...@@ -1968,21 +1972,23 @@ package body Prj.Proc is ...@@ -1968,21 +1972,23 @@ package body Prj.Proc is
if The_Array_Element = No_Array_Element then if The_Array_Element = No_Array_Element then
Array_Element_Table.Increment_Last Array_Element_Table.Increment_Last
(In_Tree.Array_Elements); (In_Tree.Array_Elements);
The_Array_Element := Array_Element_Table.Last The_Array_Element :=
(In_Tree.Array_Elements); Array_Element_Table.Last
(In_Tree.Array_Elements);
In_Tree.Array_Elements.Table In_Tree.Array_Elements.Table
(The_Array_Element) := (The_Array_Element) :=
(Index => Index_Name, (Index => Index_Name,
Src_Index => Source_Index, Src_Index => Source_Index,
Index_Case_Sensitive => Index_Case_Sensitive =>
not Case_Insensitive not Case_Insensitive
(Current_Item, From_Project_Node_Tree), (Current_Item, From_Project_Node_Tree),
Value => New_Value, Value => New_Value,
Next => In_Tree.Arrays.Table Next =>
(The_Array).Value); In_Tree.Arrays.Table (The_Array).Value);
In_Tree.Arrays.Table
(The_Array).Value := The_Array_Element; In_Tree.Arrays.Table (The_Array).Value :=
The_Array_Element;
-- An element with the same index already exists, -- An element with the same index already exists,
-- just replace its value with the new one. -- just replace its value with the new one.
......
...@@ -687,10 +687,11 @@ package body Prj is ...@@ -687,10 +687,11 @@ package body Prj is
is is
Index_Img : constant String := Source_Index'Img; Index_Img : constant String := Source_Index'Img;
Last : Natural; Last : Natural;
begin begin
Get_Name_String (Source_File_Name); Get_Name_String (Source_File_Name);
Last := Name_Len;
Last := Name_Len;
while Last > 1 and then Name_Buffer (Last) /= '.' loop while Last > 1 and then Name_Buffer (Last) /= '.' loop
Last := Last - 1; Last := Last - 1;
end loop; end loop;
...@@ -704,7 +705,6 @@ package body Prj is ...@@ -704,7 +705,6 @@ package body Prj is
if Object_File_Suffix = No_Name then if Object_File_Suffix = No_Name then
Add_Str_To_Name_Buffer (Object_Suffix); Add_Str_To_Name_Buffer (Object_Suffix);
else else
Add_Str_To_Name_Buffer (Get_Name_String (Object_File_Suffix)); Add_Str_To_Name_Buffer (Get_Name_String (Object_File_Suffix));
end if; end if;
......
...@@ -346,6 +346,8 @@ package Prj is ...@@ -346,6 +346,8 @@ package Prj is
Equal => "="); Equal => "=");
-- A hash table to store the mapping files that are not used -- A hash table to store the mapping files that are not used
-- The following record ???
type Lang_Naming_Data is record type Lang_Naming_Data is record
Dot_Replacement : File_Name_Type := No_File; Dot_Replacement : File_Name_Type := No_File;
-- The string to replace '.' in the source file name (for Ada) -- The string to replace '.' in the source file name (for Ada)
...@@ -401,10 +403,11 @@ package Prj is ...@@ -401,10 +403,11 @@ package Prj is
type Path_Syntax_Kind is type Path_Syntax_Kind is
(Canonical, (Canonical,
-- Unix style -- Unix style
Host); Host);
-- Host specific syntax, for example on VMS (the default) -- Host specific syntax, for example on VMS (the default)
-- The following record describes the configuration of a language
type Language_Config is record type Language_Config is record
Kind : Language_Kind := File_Based; Kind : Language_Kind := File_Based;
-- Kind of language. All languages are file based, except Ada which is -- Kind of language. All languages are file based, except Ada which is
...@@ -414,10 +417,10 @@ package Prj is ...@@ -414,10 +417,10 @@ package Prj is
-- The naming data for the languages (prefixes, etc.) -- The naming data for the languages (prefixes, etc.)
Include_Compatible_Languages : Name_List_Index := No_Name_List; Include_Compatible_Languages : Name_List_Index := No_Name_List;
-- The list of languages that are "include compatible" with this -- List of languages that are "include compatible" with this language. A
-- language. A language B (for example "C") is "include compatible" with -- language B (for example "C") is "include compatible" with a language
-- a language A (for example "C++") if it is expected that sources of -- A (for example "C++") if it is expected that sources of language A
-- language A may "include" header files from language B. -- may "include" header files from language B.
Compiler_Driver : File_Name_Type := No_File; Compiler_Driver : File_Name_Type := No_File;
-- The name of the executable for the compiler of the language -- The name of the executable for the compiler of the language
...@@ -433,22 +436,21 @@ package Prj is ...@@ -433,22 +436,21 @@ package Prj is
-- The list of final switches that are required as a minimum to invoke -- The list of final switches that are required as a minimum to invoke
-- the compiler driver. -- the compiler driver.
Multi_Unit_Switches : Name_List_Index := No_Name_List; Multi_Unit_Switches : Name_List_Index := No_Name_List;
-- The switch(es) to indicate the index of a unit in a multi-source -- The switch(es) to indicate the index of a unit in a multi-source file
-- file.
Multi_Unit_Object_Separator : Character := ' '; Multi_Unit_Object_Separator : Character := ' ';
-- The string separating the base name of a source from the index of -- The string separating the base name of a source from the index of the
-- the unit in a multi-source file, in the object file name. -- unit in a multi-source file, in the object file name.
Path_Syntax : Path_Syntax_Kind := Host; Path_Syntax : Path_Syntax_Kind := Host;
-- Value may be Canonical (Unix style) or Host (host syntax, for example -- Value may be Canonical (Unix style) or Host (host syntax, for example
-- on VMS for DEC C). -- on VMS for DEC C).
Object_File_Suffix : Name_Id := No_Name; Object_File_Suffix : Name_Id := No_Name;
-- Optional alternate object file suffix -- Optional alternate object file suffix
Object_File_Switches : Name_List_Index := No_Name_List; Object_File_Switches : Name_List_Index := No_Name_List;
-- Optional object file switches. When this is defined, the switches -- Optional object file switches. When this is defined, the switches
-- are used to specify the object file. The object file name is appended -- are used to specify the object file. The object file name is appended
-- to the last switch in the list. Example: ("-o", ""). -- to the last switch in the list. Example: ("-o", "").
...@@ -458,48 +460,47 @@ package Prj is ...@@ -458,48 +460,47 @@ package Prj is
-- shared libraries. Specified in the configuration. When not specified, -- shared libraries. Specified in the configuration. When not specified,
-- there is no need for such switch. -- there is no need for such switch.
Object_Generated : Boolean := True; Object_Generated : Boolean := True;
-- False in no object file is generated -- False in no object file is generated
Objects_Linked : Boolean := True; Objects_Linked : Boolean := True;
-- False if object files are not use to link executables and build -- False if object files are not use to link executables and build
-- libraries. -- libraries.
Runtime_Library_Dir : Name_Id := No_Name; Runtime_Library_Dir : Name_Id := No_Name;
-- Path name of the runtime library directory, if any -- Path name of the runtime library directory, if any
Runtime_Source_Dir : Name_Id := No_Name; Runtime_Source_Dir : Name_Id := No_Name;
-- Path name of the runtime source directory, if any -- Path name of the runtime source directory, if any
Mapping_File_Switches : Name_List_Index := No_Name_List; Mapping_File_Switches : Name_List_Index := No_Name_List;
-- The option(s) to provide a mapping file to the compiler. Specified in -- The option(s) to provide a mapping file to the compiler. Specified in
-- the configuration. When value is No_Name_List, there is no mapping -- the configuration. When value is No_Name_List, there is no mapping
-- file. -- file.
Mapping_Spec_Suffix : File_Name_Type := No_File; Mapping_Spec_Suffix : File_Name_Type := No_File;
-- Placeholder representing the spec suffix in a mapping file -- Placeholder representing the spec suffix in a mapping file
Mapping_Body_Suffix : File_Name_Type := No_File; Mapping_Body_Suffix : File_Name_Type := No_File;
-- Placeholder representing the body suffix in a mapping file -- Placeholder representing the body suffix in a mapping file
Config_File_Switches : Name_List_Index := No_Name_List; Config_File_Switches : Name_List_Index := No_Name_List;
-- The option(s) to provide a config file to the compiler. Specified in -- The option(s) to provide a config file to the compiler. Specified in
-- the configuration. When value is No_Name_List, there is no config -- the configuration. If value is No_Name_List there is no config file.
-- file.
Dependency_Kind : Dependency_File_Kind := None; Dependency_Kind : Dependency_File_Kind := None;
-- The kind of dependency to be checked: none, Makefile fragment or -- The kind of dependency to be checked: none, Makefile fragment or
-- ALI file (for Ada). -- ALI file (for Ada).
Dependency_Option : Name_List_Index := No_Name_List; Dependency_Option : Name_List_Index := No_Name_List;
-- The option(s) to be used to create the dependency file. When value is -- The option(s) to be used to create the dependency file. When value is
-- No_Name_List, there is not such option(s). -- No_Name_List, there is not such option(s).
Compute_Dependency : Name_List_Index := No_Name_List; Compute_Dependency : Name_List_Index := No_Name_List;
-- Hold the value of attribute Dependency_Driver, if declared for the -- Hold the value of attribute Dependency_Driver, if declared for the
-- language. -- language.
Include_Option : Name_List_Index := No_Name_List; Include_Option : Name_List_Index := No_Name_List;
-- Hold the value of attribute Include_Switches, if declared for the -- Hold the value of attribute Include_Switches, if declared for the
-- language. -- language.
...@@ -519,55 +520,54 @@ package Prj is ...@@ -519,55 +520,54 @@ package Prj is
-- Name of environment variable declared by attribute Objects_Path_File -- Name of environment variable declared by attribute Objects_Path_File
-- for the language. -- for the language.
Config_Body : Name_Id := No_Name; Config_Body : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a specific -- The template for a pragma Source_File_Name(_Project) for a specific
-- file name of a body. -- file name of a body.
Config_Body_Index : Name_Id := No_Name; Config_Body_Index : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a specific -- The template for a pragma Source_File_Name(_Project) for a specific
-- file name of a body in a multi-source file. -- file name of a body in a multi-source file.
Config_Body_Pattern : Name_Id := No_Name; Config_Body_Pattern : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a naming -- The template for a pragma Source_File_Name(_Project) for a naming
-- body pattern. -- body pattern.
Config_Spec : Name_Id := No_Name; Config_Spec : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a specific -- The template for a pragma Source_File_Name(_Project) for a specific
-- file name of a spec. -- file name of a spec.
Config_Spec_Index : Name_Id := No_Name; Config_Spec_Index : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a specific -- The template for a pragma Source_File_Name(_Project) for a specific
-- file name of a spec in a multi-source file. -- file name of a spec in a multi-source file.
Config_Spec_Pattern : Name_Id := No_Name; Config_Spec_Pattern : Name_Id := No_Name;
-- The template for a pragma Source_File_Name(_Project) for a naming -- The template for a pragma Source_File_Name(_Project) for a naming
-- spec pattern. -- spec pattern.
Config_File_Unique : Boolean := False; Config_File_Unique : Boolean := False;
-- Indicate if the config file specified to the compiler needs to be -- Indicate if the config file specified to the compiler needs to be
-- unique. If it is unique, then all config files are concatenated into -- unique. If it is unique, then all config files are concatenated into
-- a temp config file. -- a temp config file.
Binder_Driver : File_Name_Type := No_File; Binder_Driver : File_Name_Type := No_File;
-- The name of the binder driver for the language, if any -- The name of the binder driver for the language, if any
Binder_Driver_Path : Path_Name_Type := No_Path; Binder_Driver_Path : Path_Name_Type := No_Path;
-- The path name of the binder driver -- The path name of the binder driver
Binder_Required_Switches : Name_List_Index := No_Name_List; Binder_Required_Switches : Name_List_Index := No_Name_List;
-- Hold the value of attribute Binder'Required_Switches for the language -- Hold the value of attribute Binder'Required_Switches for the language
Binder_Prefix : Name_Id := No_Name; Binder_Prefix : Name_Id := No_Name;
-- Hold the value of attribute Binder'Prefix for the language -- Hold the value of attribute Binder'Prefix for the language
Toolchain_Version : Name_Id := No_Name; Toolchain_Version : Name_Id := No_Name;
-- Hold the value of attribute Toolchain_Version for the language -- Hold the value of attribute Toolchain_Version for the language
Toolchain_Description : Name_Id := No_Name; Toolchain_Description : Name_Id := No_Name;
-- Hold the value of attribute Toolchain_Description for the language -- Hold the value of attribute Toolchain_Description for the language
end record; end record;
-- Record describing the configuration of a language
No_Language_Config : constant Language_Config := No_Language_Config : constant Language_Config :=
(Kind => File_Based, (Kind => File_Based,
...@@ -613,6 +613,8 @@ package Prj is ...@@ -613,6 +613,8 @@ package Prj is
Toolchain_Version => No_Name, Toolchain_Version => No_Name,
Toolchain_Description => No_Name); Toolchain_Description => No_Name);
-- The following record ???
type Language_Data is record type Language_Data is record
Name : Name_Id := No_Name; Name : Name_Id := No_Name;
Display_Name : Name_Id := No_Name; Display_Name : Name_Id := No_Name;
...@@ -661,104 +663,105 @@ package Prj is ...@@ -661,104 +663,105 @@ package Prj is
-- Structure to define source data -- Structure to define source data
type Source_Data is record type Source_Data is record
Project : Project_Id := No_Project; Project : Project_Id := No_Project;
-- Project of the source -- Project of the source
Source_Dir_Rank : Natural := 0; Source_Dir_Rank : Natural := 0;
-- The rank of the source directory in list declared with attribute -- The rank of the source directory in list declared with attribute
-- Source_Dirs. Two source files with the same name cannot appears in -- Source_Dirs. Two source files with the same name cannot appears in
-- different directory with the same rank. That can happen when the -- different directory with the same rank. That can happen when the
-- recursive notation <dir>/** is used in attribute Source_Dirs. -- recursive notation <dir>/** is used in attribute Source_Dirs.
Language : Language_Ptr := No_Language_Index; Language : Language_Ptr := No_Language_Index;
-- Index of the language. This is an index into -- Index of the language. This is an index into
-- Project_Tree.Languages_Data. -- Project_Tree.Languages_Data.
In_Interfaces : Boolean := True; In_Interfaces : Boolean := True;
-- False when the source is not included in interfaces, when attribute -- False when the source is not included in interfaces, when attribute
-- Interfaces is declared. -- Interfaces is declared.
Declared_In_Interfaces : Boolean := False; Declared_In_Interfaces : Boolean := False;
-- True when source is declared in attribute Interfaces -- True when source is declared in attribute Interfaces
Alternate_Languages : Language_List := null; Alternate_Languages : Language_List := null;
-- List of languages a header file may also be, in addition of language -- List of languages a header file may also be, in addition of language
-- Language_Name. -- Language_Name.
Kind : Source_Kind := Spec; Kind : Source_Kind := Spec;
-- Kind of the source: spec, body or subunit -- Kind of the source: spec, body or subunit
Unit : Unit_Index := No_Unit_Index; Unit : Unit_Index := No_Unit_Index;
-- Name of the unit, if language is unit based. This is only set for -- Name of the unit, if language is unit based. This is only set for
-- those files that are part of the compilation set (for instance a -- those files that are part of the compilation set (for instance a
-- file in an extended project that is overridden will not have this -- file in an extended project that is overridden will not have this
-- field set). -- field set).
Index : Int := 0; Index : Int := 0;
-- Index of the source in a multi unit source file (the same Source_Data -- Index of the source in a multi unit source file (the same Source_Data
-- is duplicated several times when there are several units in the same -- is duplicated several times when there are several units in the same
-- file). Index is 0 if there is either no unit or a single one, and -- file). Index is 0 if there is either no unit or a single one, and
-- starts at 1 when there are multiple units -- starts at 1 when there are multiple units
Locally_Removed : Boolean := False; Locally_Removed : Boolean := False;
-- True if the source has been "excluded" -- True if the source has been "excluded"
Replaced_By : Source_Id := No_Source; Replaced_By : Source_Id := No_Source;
-- Missing comment ???
File : File_Name_Type := No_File; File : File_Name_Type := No_File;
-- Canonical file name of the source -- Canonical file name of the source
Display_File : File_Name_Type := No_File; Display_File : File_Name_Type := No_File;
-- File name of the source, for display purposes -- File name of the source, for display purposes
Path : Path_Information := No_Path_Information; Path : Path_Information := No_Path_Information;
-- Path name of the source -- Path name of the source
Source_TS : Time_Stamp_Type := Empty_Time_Stamp; Source_TS : Time_Stamp_Type := Empty_Time_Stamp;
-- Time stamp of the source file -- Time stamp of the source file
Object_Project : Project_Id := No_Project; Object_Project : Project_Id := No_Project;
-- Project where the object file is. This might be different from -- Project where the object file is. This might be different from
-- Project when using extending project files. -- Project when using extending project files.
Object : File_Name_Type := No_File; Object : File_Name_Type := No_File;
-- File name of the object file -- File name of the object file
Current_Object_Path : Path_Name_Type := No_Path; Current_Object_Path : Path_Name_Type := No_Path;
-- Object path of an existing object file -- Object path of an existing object file
Object_Path : Path_Name_Type := No_Path; Object_Path : Path_Name_Type := No_Path;
-- Object path of the real object file -- Object path of the real object file
Object_TS : Time_Stamp_Type := Empty_Time_Stamp; Object_TS : Time_Stamp_Type := Empty_Time_Stamp;
-- Object file time stamp -- Object file time stamp
Dep_Name : File_Name_Type := No_File; Dep_Name : File_Name_Type := No_File;
-- Dependency file simple name -- Dependency file simple name
Current_Dep_Path : Path_Name_Type := No_Path; Current_Dep_Path : Path_Name_Type := No_Path;
-- Path name of an existing dependency file -- Path name of an existing dependency file
Dep_Path : Path_Name_Type := No_Path; Dep_Path : Path_Name_Type := No_Path;
-- Path name of the real dependency file -- Path name of the real dependency file
Dep_TS : Time_Stamp_Type := Empty_Time_Stamp; Dep_TS : Time_Stamp_Type := Empty_Time_Stamp;
-- Dependency file time stamp -- Dependency file time stamp
Switches : File_Name_Type := No_File; Switches : File_Name_Type := No_File;
-- File name of the switches file. For all languages, this is a file -- File name of the switches file. For all languages, this is a file
-- that ends with the .cswi extension. -- that ends with the .cswi extension.
Switches_Path : Path_Name_Type := No_Path; Switches_Path : Path_Name_Type := No_Path;
-- Path name of the switches file -- Path name of the switches file
Switches_TS : Time_Stamp_Type := Empty_Time_Stamp; Switches_TS : Time_Stamp_Type := Empty_Time_Stamp;
-- Switches file time stamp -- Switches file time stamp
Naming_Exception : Boolean := False; Naming_Exception : Boolean := False;
-- True if the source has an exceptional name -- True if the source has an exceptional name
Next_In_Lang : Source_Id := No_Source; Next_In_Lang : Source_Id := No_Source;
-- Link to another source of the same language in the same project -- Link to another source of the same language in the same project
end record; end record;
...@@ -895,117 +898,117 @@ package Prj is ...@@ -895,117 +898,117 @@ package Prj is
-- The format of the different response files -- The format of the different response files
type Project_Configuration is record type Project_Configuration is record
Target : Name_Id := No_Name; Target : Name_Id := No_Name;
-- The target of the configuration, when specified -- The target of the configuration, when specified
Run_Path_Option : Name_List_Index := No_Name_List; Run_Path_Option : Name_List_Index := No_Name_List;
-- The option to use when linking to specify the path where to look for -- The option to use when linking to specify the path where to look for
-- libraries. -- libraries.
Separate_Run_Path_Options : Boolean := False; Separate_Run_Path_Options : Boolean := False;
-- True if each directory needs to be specified in a separate run path -- True if each directory needs to be specified in a separate run path
-- option. -- option.
Executable_Suffix : Name_Id := No_Name; Executable_Suffix : Name_Id := No_Name;
-- The suffix of executables, when specified in the configuration or in -- The suffix of executables, when specified in the configuration or in
-- package Builder of the main project. When this is not specified, the -- package Builder of the main project. When this is not specified, the
-- executable suffix is the default for the platform. -- executable suffix is the default for the platform.
-- Linking -- Linking
Linker : Path_Name_Type := No_Path; Linker : Path_Name_Type := No_Path;
-- Path name of the linker driver. Specified in the configuration or in -- Path name of the linker driver. Specified in the configuration or in
-- the package Builder of the main project. -- the package Builder of the main project.
Map_File_Option : Name_Id := No_Name; Map_File_Option : Name_Id := No_Name;
-- Option to use when invoking the linker to build a map file -- Option to use when invoking the linker to build a map file
Minimum_Linker_Options : Name_List_Index := No_Name_List; Minimum_Linker_Options : Name_List_Index := No_Name_List;
-- The minimum options for the linker driver. Specified in the -- The minimum options for the linker driver. Specified in the
-- configuration. -- configuration.
Linker_Executable_Option : Name_List_Index := No_Name_List; Linker_Executable_Option : Name_List_Index := No_Name_List;
-- The option(s) to indicate the name of the executable in the linker -- The option(s) to indicate the name of the executable in the linker
-- command. Specified in the configuration. When not specified, default -- command. Specified in the configuration. When not specified, default
-- to -o <executable name>. -- to -o <executable name>.
Linker_Lib_Dir_Option : Name_Id := No_Name; Linker_Lib_Dir_Option : Name_Id := No_Name;
-- The option to specify where to find a library for linking. Specified -- The option to specify where to find a library for linking. Specified
-- in the configuration. When not specified, defaults to "-L". -- in the configuration. When not specified, defaults to "-L".
Linker_Lib_Name_Option : Name_Id := No_Name; Linker_Lib_Name_Option : Name_Id := No_Name;
-- The option to specify the name of a library for linking. Specified in -- The option to specify the name of a library for linking. Specified in
-- the configuration. When not specified, defaults to "-l". -- the configuration. When not specified, defaults to "-l".
Max_Command_Line_Length : Natural := 0; Max_Command_Line_Length : Natural := 0;
-- When positive and when Resp_File_Format (see below) is not None, -- When positive and when Resp_File_Format (see below) is not None,
-- if the command line for the invocation of the linker would be greater -- if the command line for the invocation of the linker would be greater
-- than this value, a response file is used to invoke the linker. -- than this value, a response file is used to invoke the linker.
Resp_File_Format : Response_File_Format := None; Resp_File_Format : Response_File_Format := None;
-- The format of a response file, when linking with a response file is -- The format of a response file, when linking with a response file is
-- supported. -- supported.
Resp_File_Options : Name_List_Index := No_Name_List; Resp_File_Options : Name_List_Index := No_Name_List;
-- The switches, if any, that precede the path name of the response -- The switches, if any, that precede the path name of the response
-- file in the invocation of the linker. -- file in the invocation of the linker.
-- Libraries -- Libraries
Library_Builder : Path_Name_Type := No_Path; Library_Builder : Path_Name_Type := No_Path;
-- The executable to build library (specified in the configuration) -- The executable to build library (specified in the configuration)
Lib_Support : Library_Support := None; Lib_Support : Library_Support := None;
-- The level of library support. Specified in the configuration. Support -- The level of library support. Specified in the configuration. Support
-- is none, static libraries only or both static and shared libraries. -- is none, static libraries only or both static and shared libraries.
Archive_Builder : Name_List_Index := No_Name_List; Archive_Builder : Name_List_Index := No_Name_List;
-- The name of the executable to build archives, with the minimum -- The name of the executable to build archives, with the minimum
-- switches. Specified in the configuration. -- switches. Specified in the configuration.
Archive_Builder_Append_Option : Name_List_Index := No_Name_List; Archive_Builder_Append_Option : Name_List_Index := No_Name_List;
-- The options to append object files to an archive -- The options to append object files to an archive
Archive_Indexer : Name_List_Index := No_Name_List; Archive_Indexer : Name_List_Index := No_Name_List;
-- The name of the executable to index archives, with the minimum -- The name of the executable to index archives, with the minimum
-- switches. Specified in the configuration. -- switches. Specified in the configuration.
Archive_Suffix : File_Name_Type := No_File; Archive_Suffix : File_Name_Type := No_File;
-- The suffix of archives. Specified in the configuration. When not -- The suffix of archives. Specified in the configuration. When not
-- specified, defaults to ".a". -- specified, defaults to ".a".
Lib_Partial_Linker : Name_List_Index := No_Name_List; Lib_Partial_Linker : Name_List_Index := No_Name_List;
-- Shared libraries -- Shared libraries
Shared_Lib_Driver : File_Name_Type := No_File; Shared_Lib_Driver : File_Name_Type := No_File;
-- The driver to link shared libraries. Set with attribute Library_GCC. -- The driver to link shared libraries. Set with attribute Library_GCC.
-- Default to gcc. -- Default to gcc.
Shared_Lib_Prefix : File_Name_Type := No_File; Shared_Lib_Prefix : File_Name_Type := No_File;
-- Part of a shared library file name that precedes the name of the -- Part of a shared library file name that precedes the name of the
-- library. Specified in the configuration. When not specified, defaults -- library. Specified in the configuration. When not specified, defaults
-- to "lib". -- to "lib".
Shared_Lib_Suffix : File_Name_Type := No_File; Shared_Lib_Suffix : File_Name_Type := No_File;
-- Suffix of shared libraries, after the library name in the shared -- Suffix of shared libraries, after the library name in the shared
-- library name. Specified in the configuration. When not specified, -- library name. Specified in the configuration. When not specified,
-- default to ".so". -- default to ".so".
Shared_Lib_Min_Options : Name_List_Index := No_Name_List; Shared_Lib_Min_Options : Name_List_Index := No_Name_List;
-- The minimum options to use when building a shared library -- The minimum options to use when building a shared library
Lib_Version_Options : Name_List_Index := No_Name_List; Lib_Version_Options : Name_List_Index := No_Name_List;
-- The options to use to specify a library version -- The options to use to specify a library version
Symbolic_Link_Supported : Boolean := False; Symbolic_Link_Supported : Boolean := False;
-- True if the platform supports symbolic link files -- True if the platform supports symbolic link files
Lib_Maj_Min_Id_Supported : Boolean := False; Lib_Maj_Min_Id_Supported : Boolean := False;
-- True if platform supports library major and minor options, such as -- True if platform supports library major and minor options, such as
-- libname.so -> libname.so.2 -> libname.so.2.4 -- libname.so -> libname.so.2 -> libname.so.2.4
Auto_Init_Supported : Boolean := False; Auto_Init_Supported : Boolean := False;
-- True if automatic initialisation is supported for shared stand-alone -- True if automatic initialisation is supported for shared stand-alone
-- libraries. -- libraries.
end record; end record;
...@@ -1185,7 +1188,7 @@ package Prj is ...@@ -1185,7 +1188,7 @@ package Prj is
-- The sources for all languages including Ada are accessible through -- The sources for all languages including Ada are accessible through
-- the Source_Iterator type -- the Source_Iterator type
Interfaces_Defined : Boolean := False; Interfaces_Defined : Boolean := False;
-- True if attribute Interfaces is declared for the project or any -- True if attribute Interfaces is declared for the project or any
-- project it extends. -- project it extends.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment