OSDN Git Service

2005-07-04 Vincent Celier <celier@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / mlib-utl.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             M L I B . U T L                              --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --            Copyright (C) 2001-2005, Ada Core Technologies, Inc           --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, USA.                                              --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 --  This package provides an easy way of calling various tools such as gcc,
28 --  ar, etc...
29
30 package MLib.Utl is
31
32    procedure Delete_File (Filename : in String);
33    --  Delete the file Filename
34    --  Why is this different from the standard OS_Lib routine???
35
36    procedure Gcc
37      (Output_File : String;
38       Objects     : Argument_List;
39       Options     : Argument_List;
40       Options_2   : Argument_List;
41       Driver_Name : Name_Id := No_Name);
42    --  Driver_Name indicates the "driver" to invoke; by default, the "driver"
43    --  is gcc. This procedure invokes the driver to create a shared library.
44    --  Options are passed to gcc before the objects, Options_2 after.
45    --  Output_File is the name of the library file to create. Objects are the
46    --  names of the object files to put in the library.
47
48    procedure Ar
49      (Output_File : String;
50       Objects     : Argument_List);
51    --  Run ar to move all the binaries inside the archive. If ranlib is on the
52    --  path, run it also. Output_File is the path name of the archive to
53    --  create. Objects is the list of the path names of the object files to be
54    --  put in the archive.
55
56    function Lib_Directory return String;
57    --  Return the directory containing libgnat
58
59 end MLib.Utl;