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-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------------------------------------------------------------------------------ 26 27-- This package provides an easy way of calling various tools such as gcc, 28-- ar, etc... 29 30package MLib.Utl is 31 32 No_Argument_List : constant Argument_List := (1 .. 0 => null); 33 -- Comment needed ??? 34 35 procedure Delete_File (Filename : in String); 36 -- Delete the file Filename 37 -- Why is this different from the standard OS_Lib routine??? 38 39 procedure Gcc 40 (Output_File : String; 41 Objects : Argument_List; 42 Options : Argument_List; 43 Driver_Name : Name_Id := No_Name; 44 Options_2 : Argument_List := No_Argument_List); 45 -- Driver_Name indicates the "driver" to invoke; by default, the "driver" 46 -- is gcc. 47 -- This procedure invokes the driver to create a shared library. 48 -- Options are passed to gcc before the objects, Options_2 after. 49 -- Output_File is the name of the library file to create. 50 -- Objects are the names of the object files to put in the library. 51 52 procedure Ar 53 (Output_File : String; 54 Objects : Argument_List); 55 -- Run ar to move all the binaries inside the archive. 56 -- If ranlib is on the path, run it also. 57 -- Arguments need documenting ??? 58 59 function Lib_Directory return String; 60 -- Return the directory containing libgnat 61 62end MLib.Utl; 63