1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
with GNATCOLL.Projects; use GNATCOLL.Projects;
with GNATCOLL.Traces; use GNATCOLL.Traces;
with GNATCOLL.VFS; use GNATCOLL.VFS;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.IO; use GNAT.IO; -- not text_io to avoid CR+LF
procedure Objects is
use Library_Info_Lists;
Env : Project_Environment_Access;
Tree : Project_Tree;
LIs : Library_Info_List;
C : Library_Info_Lists.Cursor;
Current_Dir : constant Virtual_File := Get_Current_Dir;
begin
Parse_Config_File;
Initialize (Env);
Env.Set_Xrefs_Subdir ("SCIL");
Env.Set_Object_Subdir ("codepeer");
Tree.Load (Create ("sample.gpr"), Env);
LIs.Clear;
Tree.Root_Project.Library_Files
(Recursive => True,
List => LIs,
Exclude_Overridden => True,
Xrefs_Dirs => True);
C := First (LIs);
while Has_Element (C) loop
Put_Line ("exclude LI="
& Format_Pathname
(+Relative_Path (Element (C).Library_File, Current_Dir),
UNIX));
Next (C);
end loop;
LIs.Clear;
Tree.Root_Project.Library_Files
(Recursive => True,
List => LIs,
Exclude_Overridden => False,
Xrefs_Dirs => True);
C := First (LIs);
while Has_Element (C) loop
Put_Line ("not exclude LI="
& Format_Pathname
(+Relative_Path (Element (C).Library_File, Current_Dir),
UNIX));
Next (C);
end loop;
end Objects;
|