OSDN Git Service

2004-05-10 Doug Rupp <rupp@gnat.com>
[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 --          Copyright (C) 1992-2004 Free Software Foundation, 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 with Osint;  use Osint;
28 with Output; use Output;
29 with Usage;
30
31 procedure Makeusg is
32
33 --  Start of processing for Makeusg
34
35 begin
36    --  Usage line
37
38    Write_Str ("Usage: ");
39    Osint.Write_Program_Name;
40    Write_Str ("  opts  name  ");
41    Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts] [-margs opts]}");
42    Write_Eol;
43    Write_Eol;
44    Write_Str ("  name is one or more file name from which you");
45    Write_Str (" can omit the .adb or .ads suffix");
46    Write_Eol;
47    Write_Eol;
48
49    --  GNATMAKE switches
50
51    Write_Str ("gnatmake switches:");
52    Write_Eol;
53
54    --  Line for -a
55
56    Write_Str ("  -a       Consider all files, even readonly ali files");
57    Write_Eol;
58
59    --  Line for -b
60
61    Write_Str ("  -b       Bind only");
62    Write_Eol;
63
64    --  Line for -B
65
66    Write_Str ("  -B       Build, bind and link full project");
67    Write_Eol;
68
69    --  Line for -c
70
71    Write_Str ("  -c       Compile only");
72    Write_Eol;
73
74    --  Line for -C
75
76    Write_Str ("  -C       Cache source mappings: " &
77               "invoke compiler with temp mapping file");
78    Write_Eol;
79
80    --  Line for -C=<mapping file>
81
82    Write_Str ("  -C=mapp  Cache source mappings: " &
83               "invoke compiler with mapping file mapp");
84    Write_Eol;
85
86    --  Line for -D
87
88    Write_Str ("  -D dir   Specify dir as the object directory");
89    Write_Eol;
90
91    --  Line for -eI
92
93    Write_Str ("  -eI      Index of unit in multi-unit source file");
94    Write_Eol;
95
96    --  Line for -eL
97
98    Write_Str ("  -eL      Follow symbolic links when processing " &
99               "project files");
100    Write_Eol;
101
102    --  Line for -f
103
104    Write_Str ("  -f       Force recompilations of non predefined units");
105    Write_Eol;
106
107    --  Line for -F
108
109    Write_Str ("  -F       Full project path name in brief error messages");
110    Write_Eol;
111
112    --  Line for -i
113
114    Write_Str ("  -i       In place. Replace existing ali file, ");
115    Write_Str ("or put it with source");
116    Write_Eol;
117
118    --  Line for -jnnn
119
120    Write_Str ("  -jnum    Use nnn processes to compile");
121    Write_Eol;
122
123    --  Line for -k
124
125    Write_Str ("  -k       Keep going after compilation errors");
126    Write_Eol;
127
128    --  Line for -l
129
130    Write_Str ("  -l       Link only");
131    Write_Eol;
132
133    --  Line for -m
134
135    Write_Str ("  -m       Minimal recompilation");
136    Write_Eol;
137
138    --  Line for -M
139
140    Write_Str ("  -M       List object file dependences for Makefile");
141    Write_Eol;
142
143    --  Line for -n
144
145    Write_Str ("  -n       Check objects up to date, output next file ");
146    Write_Str ("to compile if not");
147    Write_Eol;
148
149    --  Line for -o
150
151    Write_Str ("  -o name  Choose an alternate executable name");
152    Write_Eol;
153
154    --  Line for -P
155
156    Write_Str ("  -Pproj   Use GNAT Project File proj");
157    Write_Eol;
158
159    --  Line for -q
160
161    Write_Str ("  -q       Be quiet/terse");
162    Write_Eol;
163
164    --  Line for -R
165
166    Write_Str ("  -R       Do not use a run_path_option when linking");
167    Write_Eol;
168
169    --  Line for -s
170
171    Write_Str ("  -s       Recompile if compiler switches have changed");
172    Write_Eol;
173
174    --  Line for -u
175
176    Write_Str ("  -u       Unique compilation. Only compile the given files.");
177    Write_Eol;
178
179    --  Line for -U
180
181    Write_Str ("  -U       Unique compilation for all sources of all projects");
182    Write_Eol;
183
184    --  Line for -v
185
186    Write_Str ("  -v       Display reasons for all (re)compilations");
187    Write_Eol;
188
189    --  Line for -vPx
190
191    Write_Str ("  -vPx     Specify verbosity when parsing GNAT Project Files");
192    Write_Eol;
193
194    --  Line for -x
195
196    Write_Str ("  -x       " &
197               "Allow compilation of needed units external to the projects");
198    Write_Eol;
199
200    --  Line for -X
201
202    Write_Str ("  -Xnm=val Specify an external reference for GNAT " &
203               "Project Files");
204    Write_Eol;
205
206    --  Line for -z
207
208    Write_Str ("  -z       No main subprogram (zero main)");
209    Write_Eol;
210    Write_Eol;
211
212    Write_Str ("  --GCC=command       Use this gcc command");
213    Write_Eol;
214
215    Write_Str ("  --GNATBIND=command  Use this gnatbind command");
216    Write_Eol;
217
218    Write_Str ("  --GNATLINK=command  Use this gnatlink command");
219    Write_Eol;
220    Write_Eol;
221
222    --  Source and Library search path switches
223
224    Write_Str ("Source and Library search path switches:");
225    Write_Eol;
226
227    --  Line for -aL
228
229    Write_Str ("  -aLdir    Skip missing library sources if ali in dir");
230    Write_Eol;
231
232    --  Line for -A
233
234    Write_Str ("  -Adir     like -aLdir -aIdir");
235    Write_Eol;
236
237    --  Line for -aO switch
238
239    Write_Str ("  -aOdir    Specify library/object files search path");
240    Write_Eol;
241
242    --  Line for -aI switch
243
244    Write_Str ("  -aIdir    Specify source files search path");
245    Write_Eol;
246
247    --  Line for -I switch
248
249    Write_Str ("  -Idir     Like -aIdir -aOdir");
250    Write_Eol;
251
252    --  Line for -I- switch
253
254    Write_Str ("  -I-       Don't look for sources & library files");
255    Write_Str (" in the default directory");
256    Write_Eol;
257
258    --  Line for -L
259
260    Write_Str ("  -Ldir     Look for program libraries also in dir");
261    Write_Eol;
262
263    --  Line for -nostdinc
264
265    Write_Str ("  -nostdinc Don't look for sources");
266    Write_Str (" in the system default directory");
267    Write_Eol;
268
269    --  Line for -nostdlib
270
271    Write_Str ("  -nostdlib Don't look for library files");
272    Write_Str (" in the system default directory");
273    Write_Eol;
274
275    --  Line for --RTS
276
277    Write_Str ("  --RTS=dir specify the default source and object search"
278               & " path");
279    Write_Eol;
280    Write_Eol;
281
282    --  General Compiler, Binder, Linker switches
283
284    Write_Str ("To pass an arbitrary switch to the Compiler, ");
285    Write_Str ("Binder or Linker:");
286    Write_Eol;
287
288    --  Line for -cargs
289
290    Write_Str ("  -cargs opts   opts are passed to the compiler");
291    Write_Eol;
292
293    --  Line for -bargs
294
295    Write_Str ("  -bargs opts   opts are passed to the binder");
296    Write_Eol;
297
298    --  Line for -largs
299
300    Write_Str ("  -largs opts   opts are passed to the linker");
301    Write_Eol;
302
303    --  Line for -margs
304
305    Write_Str ("  -margs opts   opts are passed to gnatmake");
306    Write_Eol;
307
308    --  Add usage information for gcc
309
310    Usage;
311
312 end Makeusg;