end if;
if Target = "" then
- OK := not Autoconf_Specified or Tgt_Name = No_Name;
+ OK := not Autoconf_Specified or else Tgt_Name = No_Name;
else
OK := Tgt_Name /= No_Name
and then Target = Get_Name_String (Tgt_Name);
-- gprconfig.
if not Is_Directory (Obj_Dir)
- and then (Setup_Projects or Subdirs /= null)
+ and then (Setup_Projects or else Subdirs /= null)
then
begin
Create_Path (Obj_Dir);
Always_Errout_Finalize => False,
Packages_To_Check => Packages_To_Check,
Current_Directory => Current_Directory,
- Is_Config_File => True);
+ Is_Config_File => True,
+ Flags => Flags);
else
-- Maybe the user will want to create his own configuration file
Config_Project_Node := Empty_Node;
-- auto-conf mode, since the appropriate target was passed to gprconfig.
if not Automatically_Generated
- and not Check_Target
- (Config, Autoconf_Specified, Project_Tree, Target_Name)
+ and then not
+ Check_Target (Config, Autoconf_Specified, Project_Tree, Target_Name)
then
Automatically_Generated := True;
goto Process_Config_File;
Always_Errout_Finalize => False,
Packages_To_Check => Packages_To_Check,
Current_Directory => Current_Directory,
- Is_Config_File => False);
+ Is_Config_File => False,
+ Flags => Flags);
if User_Project_Node = Empty_Node then
User_Project_Node := Empty_Node;
Name : Name_Id;
Naming : Project_Node_Id;
+ -- Start of processing for Add_Default_GNAT_Naming_Scheme
+
begin
if Config_File = Empty_Node then
Name_Buffer (1 .. Name_Len) := Auto_Cgpr;
Name := Name_Find;
+ -- An invalid project name to avoid conflicts with user-created ones
+
+ Name_Len := 5;
+ Name_Buffer (1 .. Name_Len) := "_auto";
+
Config_File :=
Create_Project
(In_Tree => Project_Tree,
- Name => Name_Default,
+ Name => Name_Find,
Full_Path => Path_Name_Type (Name),
Is_Config_File => True);
Create_Attribute (Name_Library_Auto_Init_Supported, "false");
end if;
- -- Setup Ada support (Ada is the default language here, since this is
- -- only called when no config file existed initially, ie for
+ -- Setup Ada support (Ada is the default language here, since this
+ -- is only called when no config file existed initially, ie for
-- gnatmake).
Create_Attribute (Name_Default_Language, "ada");
(Project => Config_File,
In_Tree => Project_Tree,
Backward_Compatibility => False);
-
end if;
end if;
end Add_Default_GNAT_Naming_Scheme;