OSDN Git Service

* configure.in (all_headers, all_lib2funcs): Remove.
[pf3gnuchains/gcc-fork.git] / gcc / ada / makeusg.adb
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              M A K E U S G                               --
6 --                                                                          --
7 --                                 B o d y                                  --
8 --                                                                          --
9 --                            $Revision$
10 --                                                                          --
11 --          Copyright (C) 1992-2001 Free Software Foundation, Inc.          --
12 --                                                                          --
13 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- GNAT was originally developed  by the GNAT team at  New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 --                                                                          --
27 ------------------------------------------------------------------------------
28
29 with Osint;  use Osint;
30 with Output; use Output;
31 with Usage;
32
33 procedure Makeusg is
34
35    procedure Write_Switch_Char;
36    --  Write two spaces followed by appropriate switch character
37
38    procedure Write_Switch_Char is
39    begin
40       Write_Str ("  ");
41       Write_Char (Switch_Character);
42    end Write_Switch_Char;
43
44 --  Start of processing for Makeusg
45
46 begin
47    --  Usage line
48
49    Write_Str ("Usage: ");
50    Osint.Write_Program_Name;
51    Write_Str ("  opts  name  ");
52    Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts]}");
53    Write_Eol;
54    Write_Eol;
55    Write_Str ("  name  is a file name from which you can omit the");
56    Write_Str (" .adb or .ads suffix");
57    Write_Eol;
58    Write_Eol;
59
60    --  GNATMAKE switches
61
62    Write_Str ("gnatmake switches:");
63    Write_Eol;
64
65    --  Line for -a
66
67    Write_Switch_Char;
68    Write_Str ("a       Consider all files, even readonly ali files");
69    Write_Eol;
70
71    --  Line for -b
72
73    Write_Switch_Char;
74    Write_Str ("b       Bind only");
75    Write_Eol;
76
77    --  Line for -c
78
79    Write_Switch_Char;
80    Write_Str ("c       Compile only");
81    Write_Eol;
82
83    --  Line for -f
84
85    Write_Switch_Char;
86    Write_Str ("f       Force recompilations of non predefined units");
87    Write_Eol;
88
89    --  Line for -i
90
91    Write_Switch_Char;
92    Write_Str ("i       In place. Replace existing ali file, ");
93    Write_Str ("or put it with source");
94    Write_Eol;
95
96    --  Line for -jnnn
97
98    Write_Switch_Char;
99    Write_Str ("jnum    Use nnn processes to compile");
100    Write_Eol;
101
102    --  Line for -k
103
104    Write_Switch_Char;
105    Write_Str ("k       Keep going after compilation errors");
106    Write_Eol;
107
108    --  Line for -l
109
110    Write_Switch_Char;
111    Write_Str ("l       Link only");
112    Write_Eol;
113
114    --  Line for -m
115
116    Write_Switch_Char;
117    Write_Str ("m       Minimal recompilation");
118    Write_Eol;
119
120    --  Line for -M
121
122    Write_Switch_Char;
123    Write_Str ("M       List object file dependences for Makefile");
124    Write_Eol;
125
126    --  Line for -n
127
128    Write_Switch_Char;
129    Write_Str ("n       Check objects up to date, output next file ");
130    Write_Str ("to compile if not");
131    Write_Eol;
132
133    --  Line for -o
134
135    Write_Switch_Char;
136    Write_Str ("o name  Choose an alternate executable name");
137    Write_Eol;
138
139    --  Line for -P
140
141    Write_Switch_Char;
142    Write_Str ("Pproj   Use GNAT Project File proj");
143    Write_Eol;
144
145    --  Line for -q
146
147    Write_Switch_Char;
148    Write_Str ("q       Be quiet/terse");
149    Write_Eol;
150
151    --  Line for -s
152
153    Write_Switch_Char;
154    Write_Str ("s       Recompile if compiler switches have changed");
155    Write_Eol;
156
157    --  Line for -u
158
159    Write_Switch_Char;
160    Write_Str ("u       Unique compilation. Only compile the given file.");
161    Write_Eol;
162
163    --  Line for -v
164
165    Write_Switch_Char;
166    Write_Str ("v       Display reasons for all (re)compilations");
167    Write_Eol;
168
169    --  Line for -vPx
170
171    Write_Switch_Char;
172    Write_Str ("vPx     Specify verbosity when parsing GNAT Project Files");
173    Write_Eol;
174
175    --  Line for -X
176
177    Write_Switch_Char;
178    Write_Str ("Xnm=val Specify an external reference for GNAT Project Files");
179    Write_Eol;
180
181    --  Line for -z
182
183    Write_Switch_Char;
184    Write_Str ("z       No main subprogram (zero main)");
185    Write_Eol;
186    Write_Eol;
187
188    Write_Str ("  --GCC=command       Use this gcc command");
189    Write_Eol;
190
191    Write_Str ("  --GNATBIND=command  Use this gnatbind command");
192    Write_Eol;
193
194    Write_Str ("  --GNATLINK=command  Use this gnatlink command");
195    Write_Eol;
196    Write_Eol;
197
198    --  Source and Library search path switches
199
200    Write_Str ("Source and Library search path switches:");
201    Write_Eol;
202
203    --  Line for -aL
204
205    Write_Switch_Char;
206    Write_Str ("aLdir    Skip missing library sources if ali in dir");
207    Write_Eol;
208
209    --  Line for -A
210
211    Write_Switch_Char;
212    Write_Str ("Adir     like -aLdir -aIdir");
213    Write_Eol;
214
215    --  Line for -aO switch
216
217    Write_Switch_Char;
218    Write_Str ("aOdir    Specify library/object files search path");
219    Write_Eol;
220
221    --  Line for -aI switch
222
223    Write_Switch_Char;
224    Write_Str ("aIdir    Specify source files search path");
225    Write_Eol;
226
227    --  Line for -I switch
228
229    Write_Switch_Char;
230    Write_Str ("Idir     Like -aIdir -aOdir");
231    Write_Eol;
232
233    --  Line for -I- switch
234
235    Write_Switch_Char;
236    Write_Str ("I-       Don't look for sources & library files");
237    Write_Str (" in the default directory");
238    Write_Eol;
239
240    --  Line for -L
241
242    Write_Switch_Char;
243    Write_Str ("Ldir     Look for program libraries also in dir");
244    Write_Eol;
245
246    --  Line for -nostdinc
247
248    Write_Switch_Char;
249    Write_Str ("nostdinc Don't look for sources");
250    Write_Str (" in the system default directory");
251    Write_Eol;
252
253    --  Line for -nostdlib
254
255    Write_Switch_Char;
256    Write_Str ("nostdlib Don't look for library files");
257    Write_Str (" in the system default directory");
258    Write_Eol;
259    Write_Eol;
260
261    --  General Compiler, Binder, Linker switches
262
263    Write_Str ("To pass an arbitrary switch to the Compiler, ");
264    Write_Str ("Binder or Linker:");
265    Write_Eol;
266
267    --  Line for -cargs
268
269    Write_Switch_Char;
270    Write_Str ("cargs opts   opts are passed to the compiler");
271    Write_Eol;
272
273    --  Line for -bargs
274
275    Write_Switch_Char;
276    Write_Str ("bargs opts   opts are passed to the binder");
277    Write_Eol;
278
279    --  Line for -largs
280
281    Write_Switch_Char;
282    Write_Str ("largs opts   opts are passed to the linker");
283    Write_Eol;
284
285    --  Add usage information for gcc
286
287    Usage;
288
289 end Makeusg;