* adaint.c: Minor cleanups.
[platform/upstream/gcc.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: 1.14 $
10 --                                                                          --
11 --          Copyright (C) 1992-2000 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 -c
72
73    Write_Switch_Char;
74    Write_Str ("c       Compile only, do not bind and link");
75    Write_Eol;
76
77    --  Line for -f
78
79    Write_Switch_Char;
80    Write_Str ("f       Force recompilations of non predefined units");
81    Write_Eol;
82
83    --  Line for -i
84
85    Write_Switch_Char;
86    Write_Str ("i       In place. Replace existing ali file, ");
87    Write_Str ("or put it with source");
88    Write_Eol;
89
90    --  Line for -jnnn
91
92    Write_Switch_Char;
93    Write_Str ("jnum    Use nnn processes to compile");
94    Write_Eol;
95
96    --  Line for -k
97
98    Write_Switch_Char;
99    Write_Str ("k       Keep going after compilation errors");
100    Write_Eol;
101
102    --  Line for -m
103
104    Write_Switch_Char;
105    Write_Str ("m       Minimal recompilation");
106    Write_Eol;
107
108    --  Line for -M
109
110    Write_Switch_Char;
111    Write_Str ("M       List object file dependences for Makefile");
112    Write_Eol;
113
114    --  Line for -n
115
116    Write_Switch_Char;
117    Write_Str ("n       Check objects up to date, output next file ");
118    Write_Str ("to compile if not");
119    Write_Eol;
120
121    --  Line for -o
122
123    Write_Switch_Char;
124    Write_Str ("o name  Choose an alternate executable name");
125    Write_Eol;
126
127    --  Line for -P
128
129    Write_Switch_Char;
130    Write_Str ("Pproj   Use GNAT Project File proj");
131    Write_Eol;
132
133    --  Line for -q
134
135    Write_Switch_Char;
136    Write_Str ("q       Be quiet/terse");
137    Write_Eol;
138
139    --  Line for -s
140
141    Write_Switch_Char;
142    Write_Str ("s       Recompile if compiler switches have changed");
143    Write_Eol;
144
145    --  Line for -u
146
147    Write_Switch_Char;
148    Write_Str ("u       Unique compilation. Only compile the given file.");
149    Write_Eol;
150
151    --  Line for -v
152
153    Write_Switch_Char;
154    Write_Str ("v       Display reasons for all (re)compilations");
155    Write_Eol;
156
157    --  Line for -vPx
158
159    Write_Switch_Char;
160    Write_Str ("vPx     Specify verbosity when parsing GNAT Project Files");
161    Write_Eol;
162
163    --  Line for -X
164
165    Write_Switch_Char;
166    Write_Str ("Xnm=val Specify an external reference for GNAT Project Files");
167    Write_Eol;
168
169    --  Line for -z
170
171    Write_Switch_Char;
172    Write_Str ("z       No main subprogram (zero main)");
173    Write_Eol;
174    Write_Eol;
175
176    Write_Str ("  --GCC=command       Use this gcc command");
177    Write_Eol;
178
179    Write_Str ("  --GNATBIND=command  Use this gnatbind command");
180    Write_Eol;
181
182    Write_Str ("  --GNATLINK=command  Use this gnatlink command");
183    Write_Eol;
184    Write_Eol;
185
186    --  Source and Library search path switches
187
188    Write_Str ("Source and Library search path switches:");
189    Write_Eol;
190
191    --  Line for -aL
192
193    Write_Switch_Char;
194    Write_Str ("aLdir    Skip missing library sources if ali in dir");
195    Write_Eol;
196
197    --  Line for -A
198
199    Write_Switch_Char;
200    Write_Str ("Adir     like -aLdir -aIdir");
201    Write_Eol;
202
203    --  Line for -aO switch
204
205    Write_Switch_Char;
206    Write_Str ("aOdir    Specify library/object files search path");
207    Write_Eol;
208
209    --  Line for -aI switch
210
211    Write_Switch_Char;
212    Write_Str ("aIdir    Specify source files search path");
213    Write_Eol;
214
215    --  Line for -I switch
216
217    Write_Switch_Char;
218    Write_Str ("Idir     Like -aIdir -aOdir");
219    Write_Eol;
220
221    --  Line for -I- switch
222
223    Write_Switch_Char;
224    Write_Str ("I-       Don't look for sources & library files");
225    Write_Str (" in the default directory");
226    Write_Eol;
227
228    --  Line for -L
229
230    Write_Switch_Char;
231    Write_Str ("Ldir     Look for program libraries also in dir");
232    Write_Eol;
233
234    --  Line for -nostdinc
235
236    Write_Switch_Char;
237    Write_Str ("nostdinc Don't look for sources");
238    Write_Str (" in the system default directory");
239    Write_Eol;
240
241    --  Line for -nostdlib
242
243    Write_Switch_Char;
244    Write_Str ("nostdlib Don't look for library files");
245    Write_Str (" in the system default directory");
246    Write_Eol;
247    Write_Eol;
248
249    --  General Compiler, Binder, Linker switches
250
251    Write_Str ("To pass an arbitrary switch to the Compiler, ");
252    Write_Str ("Binder or Linker:");
253    Write_Eol;
254
255    --  Line for -cargs
256
257    Write_Switch_Char;
258    Write_Str ("cargs opts   opts are passed to the compiler");
259    Write_Eol;
260
261    --  Line for -bargs
262
263    Write_Switch_Char;
264    Write_Str ("bargs opts   opts are passed to the binder");
265    Write_Eol;
266
267    --  Line for -largs
268
269    Write_Switch_Char;
270    Write_Str ("largs opts   opts are passed to the linker");
271    Write_Eol;
272
273    --  Add usage information for gcc
274
275    Usage;
276
277 end Makeusg;