diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:45:54 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-20 12:45:54 +0000 |
commit | ba381ae5404608221a17b0f895bade166e5cb587 (patch) | |
tree | 4f65013f967ac2ea1c063adc21103b17e57712c4 /gcc/ada/prj-makr.ads | |
parent | 4ef962616dc83114d9e1312777963c0ce6e9b97a (diff) | |
download | gcc-ba381ae5404608221a17b0f895bade166e5cb587.tar.gz |
2008-05-20 Vincent Celier <celier@adacore.com>
* prj.adb (Hash (Project_Id)): New function
(Project_Empty): Add new component Interfaces_Defined
* prj.ads (Source_Data): New component Object_Linked
(Language_Config): New components Object_Generated and Objects_Linked
(Hash (Project_Id)): New function
(Source_Data): New Boolean components In_Interfaces and
Declared_In_Interfaces.
(Project_Data): New Boolean component Interfaces_Defined
* prj-attr.adb:
New project level attribute Object_Generated and Objects_Linked
Add new project level attribute Interfaces
* prj-dect.adb: Use functions Present and No throughout
(Parse_Variable_Declaration): If a string type is specified as a simple
name and is not found in the current project, look for it also in the
ancestors of the project.
* prj-makr.adb:
Replace procedure Make with procedures Initialize, Process and Finalize
to implement H414-023: process different directories with different
patterns.
Use functions Present and No throughout
* prj-makr.ads:
Replace procedure Make with procedures Initialize, Process and Finalize
* prj-nmsc.adb
(Add_Source): Set component Object_Exists and Object_Linked accordnig to
the language configuration.
(Process_Project_Level_Array_Attributes): Process new attributes
Object_Generated and Object_Linked.
(Report_No_Sources): New Boolean parameter Continuation, defaulted to
False, to indicate that the erreor/warning is a continuation.
(Check): Call Report_No_Sources with Contnuation = True after the first
call.
(Error_Msg): Process successively contnuation character and warning
character.
(Find_Explicit_Sources): Check that all declared sources have been found
(Check_File): Indicate in hash table Source_Names when a declared source
is found.
(Check_File): Set Other_Part when found
(Find_Explicit_Sources): In multi language mode, check if all exceptions
to the naming scheme have been found. For Ada, report an error if an
exception has not been found. Otherwise, disregard the exception.
(Check_Interfaces): New procedure
(Add_Source): When Other_Part is defined, set mutual pointers in spec
and body.
(Check): In multi-language mode, call Check_Interfaces
(Process_Sources_In_Multi_Language_Mode): Set In_Interfaces to False
for an excluded source.
(Remove_Source): A source replacing a source in the interfaces is also
in the interfaces.
* prj-pars.adb: Use function Present
* prj-part.adb: Use functions Present and No throughout
(Parse_Single_Project): Set the parent project for child projects
(Create_Virtual_Extending_Project): Register project with no qualifier
(Parse_Single_Project): Allow an abstract project to be extend several
times. Do not allow an abstract project to extend a non abstract
project.
* prj-pp.adb: Use functions Present and No throughout
(Print): Take into account the full associative array attribute
declarations.
* prj-proc.adb: Use functions Present and No throughout
(Expression): Call itself with the same From_Project_Node for the
default value of an external reference.
* prj-strt.adb: Use functions Present and No throughout
(Parse_Variable_Reference): If a variable is specified as a simple name
and is not found in the current project, look for it also in the
ancestors of the project.
* prj-tree.ads, prj-tree.adb (Present): New function
(No): New function
Use functions Present and No throughout
(Parent_Project_Of): New function
(Set_Parent_Project_Of): New procedure
* snames.ads, snames.adb:
Add new standard names Object_Generated and Objects_Linked
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-makr.ads')
-rw-r--r-- | gcc/ada/prj-makr.ads | 70 |
1 files changed, 42 insertions, 28 deletions
diff --git a/gcc/ada/prj-makr.ads b/gcc/ada/prj-makr.ads index 74b90f69f67..50a97e93b51 100644 --- a/gcc/ada/prj-makr.ads +++ b/gcc/ada/prj-makr.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2001-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2008, 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- -- @@ -25,44 +25,58 @@ -- Support for procedure Gnatname --- For arbitrary naming schemes, create or update a project file, --- or create a configuration pragmas file. +-- For arbitrary naming schemes, create or update a project file, or create a +-- configuration pragmas file. + +with System.Regexp; use System.Regexp; package Prj.Makr is - procedure Make + procedure Initialize (File_Path : String; Project_File : Boolean; - Directories : Argument_List; - Name_Patterns : Argument_List; - Excluded_Patterns : Argument_List; - Foreign_Patterns : Argument_List; Preproc_Switches : Argument_List; Very_Verbose : Boolean); - -- Create a project file or a configuration pragmas file + -- Start the creation of a configuration pragmas file or the creation or + -- modification of a project file, for gnatname. + -- + -- When Project_File is False, File_Path is the name of a configuration + -- pragmas file to create. When Project_File is True, File_Path is the name + -- of a project file to create if it does not exist or to modify if it + -- already exists. + -- + -- Preproc_Switches is a list of switches to be used when invoking the + -- compiler to get the name and kind of unit of a source file. + -- + -- Very_Verbose controls the verbosity of the output, in conjunction with + -- Opt.Verbose_Mode. + + type Regexp_List is array (Positive range <>) of Regexp; + + procedure Process + (Directories : Argument_List; + Name_Patterns : Regexp_List; + Excluded_Patterns : Regexp_List; + Foreign_Patterns : Regexp_List); + -- Look for source files in the specified directories, with the specified + -- patterns. + -- + -- Directories is the list of source directories where to look for sources. -- - -- Project_File is the path name of the project file. If the project - -- file already exists parse it and keep all the elements that are not - -- automatically generated. + -- Name_Patterns is a potentially empty list of file name patterns to check + -- for Ada Sources. -- - -- Directory_List_File is the path name of a text file that - -- contains on each non empty line the path names of the source - -- directories for the project file. The source directories - -- are relative to the directory of the project file. + -- Excluded_Patterns is a potentially empty list of file name patterns that + -- should not be checked for Ada or non Ada sources. -- - -- File_Name_Patterns is a GNAT.Regexp string pattern such as - -- ".*\.ads|.*\.adb" or any other pattern. + -- Foreign_Patterns is a potentially empty list of file name patterns to + -- check for non Ada sources. -- - -- A project file (without any sources) is automatically generated - -- with the name <project>_naming. It contains a package Naming with - -- all the specs and bodies for the project. - -- A file containing the source file names is automatically - -- generated and used as the Source_File_List for the project file. - -- It includes all sources that follow the Foreign_Patterns (except those - -- that follow Excluded_Patterns). + -- At least one of Name_Patterns and Foreign_Patterns is not empty - -- Preproc_switches is a list of optional preprocessor switches -gnatep= - -- and -gnateD that are used when invoking the compiler to find the - -- unit name and kind. + procedure Finalize; + -- Write the configuration pragmas file or the project file indicated in a + -- call to procedure Initialize, after one or several calls to procedure + -- Process. end Prj.Makr; |