Commit 31b8a02d by Arnaud Charlet

[multiple changes]

2010-06-22  Vincent Celier  <celier@adacore.com>

	* projects.texi: Minor spelling error fixes.
	Minor reformatting.

2010-06-22  Emmanuel Briot  <briot@adacore.com>

	* prj-part.adb, prj-ext.adb, prj.adb, makeutl.adb, prj-conf.adb: Remove
	warnings for some with clauses.

From-SVN: r161172
parent e86a3a7e
2010-06-22 Vincent Celier <celier@adacore.com>
* projects.texi: Minor spelling error fixes.
Minor reformatting.
2010-06-22 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj-ext.adb, prj.adb, makeutl.adb, prj-conf.adb: Remove
warnings for some with clauses.
2010-06-22 Robert Dewar <dewar@adacore.com> 2010-06-22 Robert Dewar <dewar@adacore.com>
* errout.adb (Unwind_Internal_Type): Improve handling of First_Subtype * errout.adb (Unwind_Internal_Type): Improve handling of First_Subtype
......
...@@ -39,8 +39,10 @@ with Ada.Command_Line; use Ada.Command_Line; ...@@ -39,8 +39,10 @@ with Ada.Command_Line; use Ada.Command_Line;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
pragma Warnings (Off);
with System.Case_Util; use System.Case_Util; with System.Case_Util; use System.Case_Util;
with System.HTable; with System.HTable;
pragma Warnings (On);
package body Makeutl is package body Makeutl is
......
...@@ -39,8 +39,10 @@ with Prj.Tree; use Prj.Tree; ...@@ -39,8 +39,10 @@ with Prj.Tree; use Prj.Tree;
with Prj.Util; use Prj.Util; with Prj.Util; use Prj.Util;
with Prj; use Prj; with Prj; use Prj;
with Snames; use Snames; with Snames; use Snames;
with System.Case_Util; use System.Case_Util;
with System; -- Use GNAT.Case_Util instead of System.Case_Util so that this unit can
-- be used by user code with the "is an internal GNAT Unit" warning
with GNAT.Case_Util; use GNAT.Case_Util;
package body Prj.Conf is package body Prj.Conf is
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2000-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2000-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
-- -- -- --
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
with System.OS_Lib; use System.OS_Lib;
with Hostparm; with Hostparm;
with Makeutl; use Makeutl; with Makeutl; use Makeutl;
with Opt; with Opt;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -41,7 +41,9 @@ with Ada.Exceptions; use Ada.Exceptions; ...@@ -41,7 +41,9 @@ with Ada.Exceptions; use Ada.Exceptions;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
pragma Warnings (Off);
with System.HTable; use System.HTable; with System.HTable; use System.HTable;
pragma Warnings (On);
package body Prj.Part is package body Prj.Part is
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 2001-2009, Free Software Foundation, Inc. -- -- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -36,8 +36,10 @@ with Ada.Unchecked_Deallocation; ...@@ -36,8 +36,10 @@ with Ada.Unchecked_Deallocation;
with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.Directory_Operations; use GNAT.Directory_Operations;
pragma Warnings (Off);
with System.Case_Util; use System.Case_Util; with System.Case_Util; use System.Case_Util;
with System.HTable; with System.HTable;
pragma Warnings (On);
package body Prj is package body Prj is
......
...@@ -348,7 +348,7 @@ locating the specified source files in the specified source directories. ...@@ -348,7 +348,7 @@ locating the specified source files in the specified source directories.
result. result.
@item @cindex @code{Source_List_File} @item @cindex @code{Source_List_File}
If ther is a great number of files, it might be more convenient to use If there is a great number of files, it might be more convenient to use
the attribute @b{Source_List_File}, which specifies the full path of a file. the attribute @b{Source_List_File}, which specifies the full path of a file.
This file must contain a list of source file names (one per line, no This file must contain a list of source file names (one per line, no
directory information) that are searched as if they had been defined directory information) that are searched as if they had been defined
...@@ -478,7 +478,7 @@ unit. ...@@ -478,7 +478,7 @@ unit.
There can be any number of such main files within a given project, and thus There can be any number of such main files within a given project, and thus
several executables can be built in the context of a single project file. Of several executables can be built in the context of a single project file. Of
course, one givene executable might not (and in fact will not) need all the course, one given executable might not (and in fact will not) need all the
source files referenced by the project. As opposed to other build environments source files referenced by the project. As opposed to other build environments
such as @command{makefile}, one does not need to specify the list of such as @command{makefile}, one does not need to specify the list of
dependencies of each executable, the project-aware builders knows enough of the dependencies of each executable, the project-aware builders knows enough of the
...@@ -633,7 +633,7 @@ Several attributes can be used to specify the switches: ...@@ -633,7 +633,7 @@ Several attributes can be used to specify the switches:
@code{Switches} can also be given a language name as index instead of a file @code{Switches} can also be given a language name as index instead of a file
name in which case it has the same semantics as @emph{Default_Switches}. name in which case it has the same semantics as @emph{Default_Switches}.
@item @b{Local_Configuration_Pragams}: @item @b{Local_Configuration_Pragmas}:
@cindex @code{Local_Configuration_Pragmas} @cindex @code{Local_Configuration_Pragmas}
this attribute may specify the path this attribute may specify the path
of a file containing configuration pragmas for use by the Ada compiler, of a file containing configuration pragmas for use by the Ada compiler,
...@@ -646,7 +646,7 @@ The switches for the other tools are defined in a similar manner through the ...@@ -646,7 +646,7 @@ The switches for the other tools are defined in a similar manner through the
@b{Default_Switches} and @b{Switches} attributes, respectively in the @b{Default_Switches} and @b{Switches} attributes, respectively in the
@emph{Builder} package (for @command{gnatmake} and @command{gprbuild}), @emph{Builder} package (for @command{gnatmake} and @command{gprbuild}),
the @emph{Binder} package (binding Ada executables) and the @emph{Linker} the @emph{Binder} package (binding Ada executables) and the @emph{Linker}
package (for inking executables). package (for linking executables).
@c --------------------------------------------- @c ---------------------------------------------
@node Compiling with Project Files @node Compiling with Project Files
...@@ -687,12 +687,12 @@ set of actions to be executed. Here is the invocation of ...@@ -687,12 +687,12 @@ set of actions to be executed. Here is the invocation of
@smallexample @smallexample
$ gprbuild -Pbuild $ gprbuild -Pbuild
gcc -c proc.adb -o proc.o gcc -c proc.adb
gcc -c pack.adb -o pack.o gcc -c pack.adb
gcc -c utils.c -o utils.o gcc -c utils.c
gprbind proc gprbind proc
... ...
gcc proc.o -o proc.exe gcc proc.o -o proc
@end smallexample @end smallexample
@noindent @noindent
...@@ -707,8 +707,8 @@ Notice the three steps described earlier: ...@@ -707,8 +707,8 @@ Notice the three steps described earlier:
@noindent @noindent
@cindex @option{-v} option (for GPRbuild) @cindex @option{-v} option (for GPRbuild)
The default output of GPRbuild's execution is kept reasonably simple and easy to The default output of GPRbuild's execution is kept reasonably simple and easy
understand. In particular, some of the less frequently used commands are not to understand. In particular, some of the less frequently used commands are not
shown, and some parameters are abbreviated. So it is not possible to rerun the shown, and some parameters are abbreviated. So it is not possible to rerun the
effect ofthe gprbuild command by cut-and-pasting its output. GPRbuild's option effect ofthe gprbuild command by cut-and-pasting its output. GPRbuild's option
@code{-v} provides a much more verbose output which includes, among other @code{-v} provides a much more verbose output which includes, among other
...@@ -746,7 +746,7 @@ its value replace the platform-specific executable suffix. ...@@ -746,7 +746,7 @@ its value replace the platform-specific executable suffix.
The default executable suffix is empty on UNIX and ".exe" on Windows. The default executable suffix is empty on UNIX and ".exe" on Windows.
It is also possible to change the name of the produced executable by using the It is also possible to change the name of the produced executable by using the
command line switch @option{-o}. when several mains are defined in the project, command line switch @option{-o}. When several mains are defined in the project,
it is not possible to use the @option{-o} switch and the only way to change the it is not possible to use the @option{-o} switch and the only way to change the
names of the executable is provided by Attributes @code{Executable} and names of the executable is provided by Attributes @code{Executable} and
@code{Executable_Suffix}. @code{Executable_Suffix}.
...@@ -801,17 +801,16 @@ replaced by a reference to the @code{Default_Switches} attribute: ...@@ -801,17 +801,16 @@ replaced by a reference to the @code{Default_Switches} attribute:
Note the tick (@emph{'}) used to refer to attributes defined in a package. Note the tick (@emph{'}) used to refer to attributes defined in a package.
Here is the output of the GPRbuild command using this project: Here is the output of the GPRbuild command using this project:
@c This is NOT the output of gprbuild????
@smallexample @smallexample
$gprbuild -Pc_main $gprbuild -Pc_main
gcc -c -pedantic -g main.c -o main.o gcc -c -pedantic -g main.c
gcc -c -gnaty proc.adb -o proc.o gcc -c -gnaty proc.adb
gcc -c -gnaty pack.adb -o pack.o gcc -c -gnaty pack.adb
gcc -c -pedantic utils.c -o utils.o gcc -c -pedantic utils.c
gprbind main gprbind main.bexch
... ...
gcc main.o -o main.exe gcc main.o -o main
@end smallexample @end smallexample
@noindent @noindent
...@@ -837,11 +836,10 @@ allows finding of source files when searching in the source ...@@ -837,11 +836,10 @@ allows finding of source files when searching in the source
directories, and given a source file name it makes it possible to guess directories, and given a source file name it makes it possible to guess
the associated language, and thus the compiler to use. the associated language, and thus the compiler to use.
Note that the use of pragmas described in Note that the use by the Ada compiler of pragmas Source_File_Name is not
@ref{Alternative File Naming Schemes,,,gnat_ugn} by mean of a configuration supported when using project files. You must use the features described in this
pragmas file is not supported when using project files. You must use paragraph. You can however specify other configuration pragmas
the features described in this paragraph. You can however specify (@pxref{Specifying Configuration Pragmas}).
other configuration pragmas (@pxref{Specifying Configuration Pragmas}).
The following attributes can be defined in package @code{Naming}: The following attributes can be defined in package @code{Naming}:
...@@ -1003,9 +1001,9 @@ names in lower case) ...@@ -1003,9 +1001,9 @@ names in lower case)
@noindent @noindent
A @b{subsystem} is a coherent part of the complete system to be built. It is A @b{subsystem} is a coherent part of the complete system to be built. It is
represented by a set of sources and one single object directory. A system can be represented by a set of sources and one single object directory. A system can
composed of a single subsystem when it is simple as we have seen in the first be composed of a single subsystem when it is simple as we have seen in the
section,. Complex systems are usually composed of several interdependent first section. Complex systems are usually composed of several interdependent
subsystems. A subsystem is dependent on another subsystem if knowledge of the subsystems. A subsystem is dependent on another subsystem if knowledge of the
other one is required to build it, and in particular if visibility on some of other one is required to build it, and in particular if visibility on some of
the sources of this other subsystem is required. Each subsystem is usually the sources of this other subsystem is required. Each subsystem is usually
...@@ -1176,18 +1174,17 @@ end D; ...@@ -1176,18 +1174,17 @@ end D;
@c --------------------------------------------- @c ---------------------------------------------
@noindent @noindent
When building an application, it is common to have similar needs in the projects When building an application, it is common to have similar needs in severa of
corresponding to the subsystems under construction. For instance, they will all the projects corresponding to the subsystems under construction. For instance,
have the same compilation switches. they will all have the same compilation switches.
such as @code{Build} and @code{Logging}, while not wanting to affect
external subsystems, such as @code{GtkAda} in our example.
As seen before (@pxref{Tools Options in Project Files}), setting compilation As seen before (@pxref{Tools Options in Project Files}), setting compilation
switches for all sources of a subsystem is simple: it is just a matter of adding switches for all sources of a subsystem is simple: it is just a matter of
a @code{Compiler.Default_Switches} attribute to each project files with the same adding a @code{Compiler.Default_Switches} attribute to each project files with
value. Of course, that means duplication of data, and both places need to be changed the same value. Of course, that means duplication of data, and both places need
in order to recompile the whole application with different switches. It can become to be changed in order to recompile the whole application with different
a real problem if there are many subsystems and thus many project files to edit. switches. It can become a real problem if there are many subsystems and thus
many project files to edit.
There are two main approaches to avoiding this duplication: There are two main approaches to avoiding this duplication:
...@@ -1259,7 +1256,7 @@ There are two main approaches to avoiding this duplication: ...@@ -1259,7 +1256,7 @@ There are two main approaches to avoiding this duplication:
@noindent @noindent
As for the first example, we could have chosen to set the attributes As for the first example, we could have chosen to set the attributes
one by one rather than rename a package. The reason we explicitly one by one rather than to rename a package. The reason we explicitly
indicate that @code{Shared} has no sources is so that it can be created indicate that @code{Shared} has no sources is so that it can be created
in any directory and we are sure it shares no sources with @code{Build} in any directory and we are sure it shares no sources with @code{Build}
or @code{Logging}, which of course would be invalid. or @code{Logging}, which of course would be invalid.
...@@ -2932,6 +2929,7 @@ project MyProj is ...@@ -2932,6 +2929,7 @@ project MyProj is
when "NT" => when "NT" =>
for Switches ("Ada") use ("-gnatP"); for Switches ("Ada") use ("-gnatP");
when others => when others =>
null;
end case; end case;
end Compiler; end Compiler;
end MyProj; end MyProj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment