aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 12:03:30 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-10-18 12:03:30 +0200
commite7efbe2f093468f9316e891136833aae0e404a24 (patch)
tree5b2b67273a354c215e6a9d10700a644c9303f9a8 /gcc/ada/prj.adb
parentef2a63ba1869942eae7ab3ceb4cada0f025a60ad (diff)
downloadgcc-e7efbe2f093468f9316e891136833aae0e404a24.zip
gcc-e7efbe2f093468f9316e891136833aae0e404a24.tar.gz
gcc-e7efbe2f093468f9316e891136833aae0e404a24.tar.bz2
[multiple changes]
2010-10-18 Tristan Gingold <gingold@adacore.com> * init.c: Indentation, and minor changes to more closely follow GNU style rules. Make more variable statics. 2010-10-18 Vincent Celier <celier@adacore.com> * prj.adb (Is_Compilable): On first call for a source, cache value in component Compilable. * prj.ads (Source_Data): New component Compilable, to cache the value returned by function Is_Compilable. 2010-10-18 Vincent Celier <celier@adacore.com> * prj-attr.adb: New project level attribute Ignore_Source_Sub_Dirs. * prj-nmsc.adb (Expand_Subdirectory_Pattern): New string list parameter Ignore. (Recursive_Find_Dirs): Do not consider subdirectories listed in Ignore. (Get_Directories): Call Find_Source_Dirs with the string list indicated by attribute Ignore_Source_Sub_Dirs. * snames.ads-tmpl: New standard name Ignore_Source_Sub_Dirs. From-SVN: r165619
Diffstat (limited to 'gcc/ada/prj.adb')
-rw-r--r--gcc/ada/prj.adb29
1 files changed, 23 insertions, 6 deletions
diff --git a/gcc/ada/prj.adb b/gcc/ada/prj.adb
index bd929cc..6072092 100644
--- a/gcc/ada/prj.adb
+++ b/gcc/ada/prj.adb
@@ -1154,12 +1154,29 @@ package body Prj is
function Is_Compilable (Source : Source_Id) return Boolean is
begin
- return Source.Language.Config.Compiler_Driver /= No_File
- and then Length_Of_Name (Source.Language.Config.Compiler_Driver) /= 0
- and then not Source.Locally_Removed
- and then (Source.Language.Config.Kind /= File_Based
- or else
- Source.Kind /= Spec);
+ case Source.Compilable is
+ when Unknown =>
+ if Source.Language.Config.Compiler_Driver /= No_File
+ and then
+ Length_Of_Name (Source.Language.Config.Compiler_Driver) /= 0
+ and then not Source.Locally_Removed
+ and then (Source.Language.Config.Kind /= File_Based
+ or else
+ Source.Kind /= Spec)
+ then
+ Source.Compilable := Yes;
+ return True;
+ else
+ Source.Compilable := No;
+ return False;
+ end if;
+
+ when Yes =>
+ return True;
+
+ when No =>
+ return False;
+ end case;
end Is_Compilable;
------------------------------