]>
Commit | Line | Data |
---|---|---|
fbf5a39b AC |
1 | ------------------------------------------------------------------------------ |
2 | -- -- | |
3 | -- GNAT COMPILER COMPONENTS -- | |
4 | -- -- | |
5 | -- P R E P C O M P -- | |
6 | -- -- | |
7 | -- S p e c -- | |
8 | -- -- | |
1d005acc | 9 | -- Copyright (C) 2002-2019, Free Software Foundation, Inc. -- |
fbf5a39b AC |
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- -- | |
b5c84c3c | 13 | -- ware Foundation; either version 3, or (at your option) any later ver- -- |
fbf5a39b AC |
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 -- | |
b5c84c3c RD |
18 | -- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
19 | -- http://www.gnu.org/licenses for a complete copy of the license. -- | |
fbf5a39b AC |
20 | -- -- |
21 | -- GNAT was originally developed by the GNAT team at New York University. -- | |
22 | -- Extensive contributions were provided by Ada Core Technologies Inc. -- | |
23 | -- -- | |
24 | ------------------------------------------------------------------------------ | |
25 | ||
26 | -- This package stores all preprocessing data for the compiler | |
27 | ||
107cd232 | 28 | with Namet; use Namet; |
5ae24312 | 29 | with Types; use Types; |
fbf5a39b AC |
30 | |
31 | package Prepcomp is | |
32 | ||
5ae24312 | 33 | procedure Add_Dependency (S : Source_File_Index); |
fc27e20e RD |
34 | -- Add a dependency on a non-source file. This is used internally for the |
35 | -- preprocessing data file and the preprocessing definition file, and also | |
36 | -- externally for non-temporary configuration pragmas files. | |
5ae24312 | 37 | |
fbf5a39b | 38 | procedure Add_Dependencies; |
ded8909b | 39 | -- Add dependencies on the preprocessing data file and the preprocessing |
5ae24312 AC |
40 | -- definition files, if any, and the non-temporary configuration pragmas |
41 | -- files, if any. | |
fbf5a39b | 42 | |
fbf5a39b | 43 | procedure Check_Symbols; |
ded8909b AC |
44 | -- Check if there are preprocessing symbols on the command line and set |
45 | -- preprocessing if there are some: all files are preprocessed with these | |
46 | -- symbols. This procedure should not be called if there is a preprocessing | |
47 | -- data file specified on the command line. Instead a call should be made | |
48 | -- to Parse_Preprocessing_Data_File. | |
fbf5a39b AC |
49 | |
50 | procedure Parse_Preprocessing_Data_File (N : File_Name_Type); | |
9de61fcb | 51 | -- Parse a preprocessing data file, specified with a -gnatep= switch |
fbf5a39b AC |
52 | |
53 | procedure Prepare_To_Preprocess | |
54 | (Source : File_Name_Type; | |
55 | Preprocessing_Needed : out Boolean); | |
ded8909b AC |
56 | -- Prepare, if necessary, the preprocessor for a source file. If the source |
57 | -- file needs to be preprocessed, Preprocessing_Needed is set to True. | |
58 | -- Otherwise, Preprocessing_Needed is set to False and no preprocessing | |
59 | -- needs to be done. | |
fbf5a39b AC |
60 | |
61 | procedure Process_Command_Line_Symbol_Definitions; | |
62 | -- Check symbol definitions that have been added by calls to procedure | |
63 | -- Add_Symbol_Definition and stored as pointers to string, and put them in | |
64 | -- a table. The reason the definitions were stored as pointer to strings is | |
65 | -- that the name table is not yest initialized when we process the command | |
66 | -- line switches. These symbol definitions will be later used in | |
67 | -- the call to Prepare_To_Preprocess. | |
68 | ||
69 | end Prepcomp; |