diff options
author | Vincent Celier <celier@adacore.com> | 2005-09-05 09:56:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-09-05 09:56:15 +0200 |
commit | 09245ac9a7cb99f101e243591ecacef5342cbee7 (patch) | |
tree | a9b6c4257a0ffeca11fa308f5651f019e2a7f333 /gcc | |
parent | 6e18b0e511a2008299790a08da0a291c0bb4752f (diff) | |
download | gcc-09245ac9a7cb99f101e243591ecacef5342cbee7.zip gcc-09245ac9a7cb99f101e243591ecacef5342cbee7.tar.gz gcc-09245ac9a7cb99f101e243591ecacef5342cbee7.tar.bz2 |
prj-env.adb (Set_Ada_Paths.Add.Recursive_Add): Do not add the object directories of projects that have no Ada sources.
2005-09-01 Vincent Celier <celier@adacore.com>
* prj-env.adb (Set_Ada_Paths.Add.Recursive_Add): Do not add the object
directories of projects that have no Ada sources.
From-SVN: r103874
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/prj-env.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/prj-env.adb b/gcc/ada/prj-env.adb index 811ee4c..26fd99b 100644 --- a/gcc/ada/prj-env.adb +++ b/gcc/ada/prj-env.adb @@ -32,7 +32,6 @@ with Prj.Com; use Prj.Com; with Tempdir; with GNAT.Directory_Operations; use GNAT.Directory_Operations; -with GNAT.OS_Lib; use GNAT.OS_Lib; package body Prj.Env is @@ -2138,9 +2137,15 @@ package body Prj.Env is end if; -- For a non-library project, add the object - -- directory, if it is not a virtual project. - - elsif not Data.Virtual then + -- directory, if it is not a virtual project, and + -- if there are Ada sources. If there are no Ada + -- sources, adding the object directory could + -- disrupt the order of the object dirs in the path. + + elsif not Data.Virtual + and then In_Tree.Projects.Table + (Project).Ada_Sources_Present + then Add_To_Object_Path (Data.Object_Directory, In_Tree); end if; |