2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / ada / mlib.ads
blobc844ccbb389183dac3f6118dee1eeccde7770d6c
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- M L I B --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1999-2003, 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, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, 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 ------------------------------------------------------------------------------
27 -- This package provides the core high level routines used by GNATMLIB
28 -- and GNATMAKE to build libraries
30 with GNAT.OS_Lib; use GNAT.OS_Lib;
31 with Osint; use Osint;
32 with Types; use Types;
34 package MLib is
36 Max_Characters_In_Library_Name : constant := 20;
37 -- Maximum number of characters in a library name.
38 -- Used by Check_Library_Name below.
40 type Fail_Proc is access procedure
41 (S1 : String; S2 : String := ""; S3 : String := "");
43 Fail : Fail_Proc := Osint.Fail'Access;
44 -- This procedure is used in the MLib hierarchy, instead of
45 -- directly calling Osint.Fail.
46 -- It is redirected to Make.Make_Failed by gnatmake.
48 procedure Check_Library_Name (Name : String);
49 -- Verify that the name of a library has the following characteristics
50 -- - starts with a letter
51 -- - includes only letters and digits
52 -- - contains not more than Max_Characters_In_Library_Name characters
54 procedure Build_Library
55 (Ofiles : Argument_List;
56 Afiles : Argument_List;
57 Output_File : String;
58 Output_Dir : String);
59 -- Build a static library from a set of object files
61 procedure Copy_ALI_Files
62 (Files : Argument_List;
63 To : Name_Id;
64 Interfaces : String_List);
65 -- Copy all ALI files Files to directory To.
66 -- Mark Interfaces ALI files as interfaces, if any.
68 private
70 Preserve : Attribute := Time_Stamps;
71 -- Used by Copy_ALI_Files. Changed to None for OpenVMS, because
72 -- Copy_Attributes always fails on VMS.
74 end MLib;