1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 2002 Free Software Foundation, Inc. --
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. --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
25 ------------------------------------------------------------------------------
27 -- The following private package allows the ouput of text to Makefiles
28 -- though buffers. It is possible to remove some lines from the buffers
29 -- without putting them effectively in the Makefile.
31 private package Bld
.IO
is
33 procedure Create
(File_Name
: String);
34 -- Create a new Makefile
37 -- Output all not suppressed lines to the Makefile
40 -- Close the current Makefile
43 -- Delete all the Makefiles that have been created
45 function Name_Of_File
return String;
46 -- Return the path name of the current Makefile
48 type Position
is private;
49 -- Identification of a line in the Makefile
51 procedure Mark
(Pos
: out Position
);
52 -- Record the current line.
53 -- No characters should have been already put on this line.
55 procedure Release
(Pos
: Position
);
56 -- Suppress all line after this one, including this one.
58 procedure Suppress
(Pos
: Position
);
59 -- Suppress a particular line
61 procedure Put
(S
: String);
62 -- Append a string to the current line
65 -- End a line. Go to the next one (initially empty).
69 type Position
is record
70 Value
: Positive := 1;