diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-01 09:03:11 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-01 09:03:11 +0000 |
commit | 3597f4f40042e48b50ac04e7b8e2d993d9323bef (patch) | |
tree | 3b3892690a3bc3eb18346284d50688d4c422777f /gcc/ada/mlib-utl.adb | |
parent | 6dbe70cebfaf97a135aeec67cf8ffc324ba26f37 (diff) | |
download | gcc-3597f4f40042e48b50ac04e7b8e2d993d9323bef.tar.gz |
2008-08-01 Vincent Celier <celier@adacore.com>
* mlib-utl.adb:
(Adalib_Path): New variable to store the path of the adalib directory
when procedure Specify_Adalib_Dir is called.
(Lib_Directory): If Adalib_Path is not null, return its value
(Specify_Adalib_Dir): New procedure
* mlib-utl.ads (Specify_Adalib_Dir): New procedure
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-utl.adb')
-rw-r--r-- | gcc/ada/mlib-utl.adb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ada/mlib-utl.adb b/gcc/ada/mlib-utl.adb index 4d15ad85cf3..76e7db5332b 100644 --- a/gcc/ada/mlib-utl.adb +++ b/gcc/ada/mlib-utl.adb @@ -35,6 +35,10 @@ with System; package body MLib.Utl is + Adalib_Path : String_Access := null; + -- Path of the GNAT adalib directory, specified in procedure + -- Specify_Adalib_Dir. Used in function Lib_Directory. + Gcc_Name : String_Access; -- Default value of the "gcc" executable used in procedure Gcc @@ -597,6 +601,13 @@ package body MLib.Utl is Libgnat : constant String := Tgt.Libgnat; begin + -- If procedure Specify_Adalib_Dir has been called, used the specified + -- value. + + if Adalib_Path /= null then + return Adalib_Path.all; + end if; + Name_Len := Libgnat'Length; Name_Buffer (1 .. Name_Len) := Libgnat; Get_Name_String (Osint.Find_File (Name_Enter, Osint.Library)); @@ -606,4 +617,17 @@ package body MLib.Utl is return Name_Buffer (1 .. Name_Len - Libgnat'Length); end Lib_Directory; + ------------------------ + -- Specify_Adalib_Dir -- + ------------------------ + + procedure Specify_Adalib_Dir (Path : String) is + begin + if Path'Length = 0 then + Adalib_Path := null; + else + Adalib_Path := new String'(Path); + end if; + end Specify_Adalib_Dir; + end MLib.Utl; |