+2009-04-24 Robert Dewar <dewar@adacore.com>
+
+ * errout.ads: Minor reformatting
+
+2009-04-24 Emmanuel Briot <briot@adacore.com>
+
+ * gnat_ugn.texi (Library Projects): add documentation on gnatmake's
+ behavior when the project includes sources from multiple languages
+
+2009-04-24 Vincent Celier <celier@adacore.com>
+
+ * prj.adb (Has_Foreign_Sources): Returns True in Ada_Only mode if there
+ is a language other than Ada declared.
+
+ * makeutl.adb (Linker_Options_Switches): Call For_All_Projects with
+ Imported_First set to True.
+
2009-04-24 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb: additional optimization to inhibit creation of
-- suppressed.
procedure Error_Msg_F (Msg : String; N : Node_Id);
- -- Similar to Error_Msg_N except that the message is placed on the
- -- first node of the construct N (First_Node (N)).
+ -- Similar to Error_Msg_N except that the message is placed on the first
+ -- node of the construct N (First_Node (N)).
procedure Error_Msg_NE
(Msg : String;
for Spec ("MyPack.MyChild") use "mypack.mychild.spec";
@end smallexample
+When the source file contains several units, you can indicate at what
+position the unit occurs in the file, with the following. The first unit
+in the file has index 1
+
+@smallexample @c projectfile
+ for Body ("top") use "foo.a" at 1;
+ for Body ("foo") use "foo.a" at 2;
+@end smallexample
+
@item @code{Body}
You can use the associative array attribute @code{Body} to
@noindent
@emph{Library projects} are projects whose object code is placed in a library.
-(Note that this facility is not yet supported on all platforms)
+(Note that this facility is not yet supported on all platforms).
+
+@code{gnatmake} or @code{gprbuild} will collect all object files into a
+single archive, which might either be a shared or a static library. This
+library can later on be linked with multiple executables, potentially
+reducing their sizes.
+
+If your project file specifies languages other than Ada, but you are still
+using @code{gnatmake} to compile and link, the latter will not try to
+compile your sources other than Ada (you should use @code{gprbuild} if that
+is your intent). However, @code{gnatmake} will automatically link all object
+files found in the object directory, whether or not they were compiled from
+an Ada source file. This specific behavior only applies when multiple
+languages are specified.
To create a library project, you need to define in its project file
two project-level attributes: @code{Library_Name} and @code{Library_Dir}.