summaryrefslogtreecommitdiffstats
path: root/gcc/ada/prj-env.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-02 13:50:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-02 13:50:15 +0000
commitf98319dc96d784a6cb010309c645db5b271322ba (patch)
treeffca003370276e7fdf11cb7188a875852481cff5 /gcc/ada/prj-env.adb
parentc8657a08116e11b3b629b079f25f0f0ebd79463c (diff)
downloadppe42-gcc-f98319dc96d784a6cb010309c645db5b271322ba.tar.gz
ppe42-gcc-f98319dc96d784a6cb010309c645db5b271322ba.zip
2004-03-02 Emmanuel Briot <briot@act-europe.fr>
* ali.adb (Read_Instantiation_Instance): Do not modify the current_file_num when reading information about instantiations, since this corrupts files in later references. 2004-03-02 Vincent Celier <celier@gnat.com> * bcheck.adb (Check_Consistency): Get the full path of an ALI file before checking if it is read-only. * bld.adb (Recursive_Process): Concatenate <PROJECT>.src_dirs in front of SRC_DIRS and eliminate duplicates. * gprcmd.adb: Replace command "path" with command "path_sep" to return the path separator. (Usage): Document path_sep * Makefile.generic: For Ada and GNU C++ cases, link directly with the C++ compiler. No need for a script. Replace use of C*_INCLUDE_PATH env var for GCC compilers with CPATH. Do not call gprcmd to build the C*_INCLUDE_PATHs, do it with function subst. * prj-env.adb (For_All_Source_Dirs): Only add source dirs in project where there are Ada sources. (Set_Ada_Paths): Only add to the include path the source dirs of project with Ada sources. (Add_To_Path): Add the Display_Values of the directories, not their Values. * prj-nmsc.adb (Find_Sources): Set flag Sources_Present in the project data. * prj-nmsc.adb (Add_ALI_For): Make sure that the element Display_Value is not No_Name. (Find_Source_Dirs): Set Display_Value to a non canonicalized value, only Value is canonicalized. (Language_Independent_Check): Do not copy Value to Display_Value when canonicalizing Value. * prj-part.adb (Post_Parse_Context_Clause): Compare canonical cased path to find limited with cycles. (Parse_Single_Project): Use canonical cased path to find the end of a with cycle. 2004-03-02 Ed Schonberg <schonberg@gnat.com> * sem_ch10.adb (Optional_Subunit): Verify that unit contains a subunit and not a child unit. * sinfo.ads, sinfo.adb: Rearrange flags so that Private_Present can appear in a with_clause. * decl.c (gnat_to_gnu_type): If entity is a generic type, which can only happen in type_annotate mode, do not try to elaborate it. * exp_util.adb (Force_Evaluation): If expression is a selected component on the left of an assignment, use a renaming rather than a temporary to remove side effects. * freeze.adb (Freeze_Entity): Do not freeze a global entity within an inlined instance body, which is analyzed before the end of the enclosing scope. 2004-03-02 Robert Dewar <dewar@gnat.com> * par-ch10.adb, par-ch3.adb, par-ch4.adb, scng.adb, sem_ch4.adb: Use new feature for substitution of keywords in VMS * errout.ads, errout.adb: Implement new circuit for substitution of keywords in VMS. * sem_case.adb (Analyze_Choices): Place message properly when case is a subtype reference rather than an explicit range. * sem_elim.adb, s-tpobop.ads, exp_ch2.adb: Minor reformatting 2004-03-02 Doug Rupp <rupp@gnat.com> * init.c (__gnat_initialize)[VMS]: Resignal RDB-E-STREAM_EOF. 2004-03-02 Thomas Quinot <quinot@act-europe.fr> * s-tporft.adb: Add missing locking around call to Initialize_ATCB. 2004-03-02 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * utils.c (finish_record_type): Do not set DECL_NONADDRESSABLE for a BLKmode bitfield. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78758 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-env.adb')
-rw-r--r--gcc/ada/prj-env.adb54
1 files changed, 30 insertions, 24 deletions
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb
index 5c3a07be0d9..d7a47b0a601 100644
--- a/gcc/ada/prj-env.adb
+++ b/gcc/ada/prj-env.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2003 Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2004 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -61,25 +61,25 @@ package body Prj.Env is
-- platforms, except on VMS where the logical names are deassigned, thus
-- avoiding the pollution of the environment of the caller.
- package Namings is new Table.Table (
- Table_Component_Type => Naming_Data,
- Table_Index_Type => Naming_Id,
- Table_Low_Bound => 1,
- Table_Initial => 5,
- Table_Increment => 100,
- Table_Name => "Prj.Env.Namings");
+ package Namings is new Table.Table
+ (Table_Component_Type => Naming_Data,
+ Table_Index_Type => Naming_Id,
+ Table_Low_Bound => 1,
+ Table_Initial => 5,
+ Table_Increment => 100,
+ Table_Name => "Prj.Env.Namings");
Default_Naming : constant Naming_Id := Namings.First;
Fill_Mapping_File : Boolean := True;
- package Path_Files is new Table.Table (
- Table_Component_Type => Name_Id,
- Table_Index_Type => Natural,
- Table_Low_Bound => 1,
- Table_Initial => 50,
- Table_Increment => 50,
- Table_Name => "Prj.Env.Path_Files");
+ package Path_Files is new Table.Table
+ (Table_Component_Type => Name_Id,
+ Table_Index_Type => Natural,
+ Table_Low_Bound => 1,
+ Table_Initial => 50,
+ Table_Increment => 50,
+ Table_Name => "Prj.Env.Path_Files");
-- Table storing all the temp path file names.
-- Used by Delete_All_Path_Files.
@@ -322,7 +322,7 @@ package body Prj.Env is
begin
while Current /= Nil_String loop
Source_Dir := String_Elements.Table (Current);
- Add_To_Path (Get_Name_String (Source_Dir.Value));
+ Add_To_Path (Get_Name_String (Source_Dir.Display_Value));
Current := Source_Dir.Next;
end loop;
end Add_To_Path;
@@ -1420,13 +1420,16 @@ package body Prj.Env is
The_String : String_Element;
begin
- -- Call action with the name of every source directorie
-
- while Current /= Nil_String loop
- The_String := String_Elements.Table (Current);
- Action (Get_Name_String (The_String.Value));
- Current := The_String.Next;
- end loop;
+ -- If there are Ada sources, call action with the name of every
+ -- source directory.
+
+ if Projects.Table (Project).Sources_Present then
+ while Current /= Nil_String loop
+ The_String := String_Elements.Table (Current);
+ Action (Get_Name_String (The_String.Value));
+ Current := The_String.Next;
+ end loop;
+ end if;
end;
-- If we are extending a project, visit it
@@ -1866,8 +1869,11 @@ package body Prj.Env is
if Process_Source_Dirs then
-- Add to path all source directories of this project
+ -- if there are Ada sources.
- Add_To_Path_File (Data.Source_Dirs, Source_FD);
+ if Projects.Table (Project).Sources_Present then
+ Add_To_Path_File (Data.Source_Dirs, Source_FD);
+ end if;
end if;
if Process_Object_Dirs then
OpenPOWER on IntegriCloud