===================================================================
@@ -1395,9 +1395,6 @@
Snames.Initialize;
Prj.Tree.Initialize (Root_Environment, Gnatmake_Flags);
- Prj.Env.Initialize_Default_Project_Path
- (Root_Environment.Project_Path,
- Target_Name => Sdefault.Target_Name.all);
Project_Node_Tree := new Project_Node_Tree_Data;
Prj.Tree.Initialize (Project_Node_Tree);
@@ -1911,6 +1908,13 @@
end Inspect_Switches;
end if;
+ -- Add the default project search directories now, after the directories
+ -- that have been specified by switches -aP<dir>.
+
+ Prj.Env.Initialize_Default_Project_Path
+ (Root_Environment.Project_Path,
+ Target_Name => Sdefault.Target_Name.all);
+
-- If there is a project file specified, parse it, get the switches
-- for the tool and setup PATH environment variables.
===================================================================
@@ -6392,8 +6392,6 @@
-- the command line switches
Prj.Tree.Initialize (Env, Gnatmake_Flags);
- Prj.Env.Initialize_Default_Project_Path
- (Env.Project_Path, Target_Name => Sdefault.Target_Name.all);
Project_Node_Tree := new Project_Node_Tree_Data;
Prj.Tree.Initialize (Project_Node_Tree);
@@ -6492,6 +6490,12 @@
Usage;
end if;
+ -- Add the default project search directories now, after the directories
+ -- that have been specified by switches -aP<dir>.
+
+ Prj.Env.Initialize_Default_Project_Path
+ (Env.Project_Path, Target_Name => Sdefault.Target_Name.all);
+
-- Test for trailing -P switch
if Project_File_Name_Present and then Project_File_Name = null then
===================================================================
@@ -1377,6 +1377,13 @@
Parse_Cmd_Line;
+ -- Add the default project search directories now, after the directories
+ -- that have been specified by switches -aP<dir>.
+
+ Prj.Env.Initialize_Default_Project_Path
+ (Root_Environment.Project_Path,
+ Target_Name => Sdefault.Target_Name.all);
+
if Verbose_Mode then
Display_Copyright;
end if;
@@ -1550,9 +1557,6 @@
Snames.Initialize;
Prj.Tree.Initialize (Root_Environment, Gnatmake_Flags);
- Prj.Env.Initialize_Default_Project_Path
- (Root_Environment.Project_Path,
- Target_Name => Sdefault.Target_Name.all);
Project_Node_Tree := new Project_Node_Tree_Data;
Prj.Tree.Initialize (Project_Node_Tree);