This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] add knowledge of project casing in gnat tools


Tested on i686-linux, committed on HEAD

Project file improvements:

Default values for external references (the optional second paraneter
of built-in function "external" in project files) may now be single
string expressions, not simply literal strings.
The following project file should be parsed and processed successfully:

project Prj is
   Obj_Dir := external ("OBJ_DIR", external ("PROJ_DIR", ".") & "/.");
   for Object_Dir use Obj_Dir;
end Prj;

In addition, store the name of the project with the
spelling found in the project file. This will allow project aware tools to
display the project name as in the project file.
To test, in an empty directory, put two project files
prj.gpr:
project prJ is
end Prj;

ext.gpr:
PROject exT extends "prj" is
end Ext;

The command
   gnatmake -P ext
should produce the error:
ext.gpr:1:09: project "exT" cannot extend project "prJ"
ext.gpr:1:09: they share the same object directory

2005-03-29  Vincent Celier  <celier@adacore.com>

	* prj.ads, prj.adb: (Project_Data): Add new component Display_Name

	* prj-part.adb (Parse_Single_Project): Set the location of a project
	on its defining identifier, rather than on the reserved word "project".

	* prj-proc.adb (Expression): Adapt to the fact that default of external
	references may be string expressions, not always literal strings.
	(Recursive_Process): Set Display_Name equal to Name
	when Location is No_Location, that is when there is no actual file.
	Get the Display_Name of the project from the source, when it is not a
	virtual project.
	(Process): Use the Display_Name in error messages

	* prj-strt.adb (External_Reference): Allow default to be string
	expressions, not only literal strings.

Attachment: difs.16
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]