]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/makeusg.adb
c++: Handle multiple aggregate overloads [PR95319].
[thirdparty/gcc.git] / gcc / ada / makeusg.adb
CommitLineData
84481f76
RK
1------------------------------------------------------------------------------
2-- --
3-- GNAT COMPILER COMPONENTS --
4-- --
5-- M A K E U S G --
6-- --
7-- B o d y --
8-- --
1d005acc 9-- Copyright (C) 1992-2019, Free Software Foundation, Inc. --
84481f76
RK
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- --
84481f76
RK
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. --
84481f76
RK
20-- --
21-- GNAT was originally developed by the GNAT team at New York University. --
71ff80dc 22-- Extensive contributions were provided by Ada Core Technologies Inc. --
84481f76
RK
23-- --
24------------------------------------------------------------------------------
25
315f0c42 26with Make_Util;
851e9f19 27with Osint;
b0256cb6 28with Output; use Output;
439b6dfa 29with Switch; use Switch;
84481f76
RK
30with Usage;
31
32procedure Makeusg is
33
84481f76
RK
34-- Start of processing for Makeusg
35
36begin
37 -- Usage line
38
39 Write_Str ("Usage: ");
40 Osint.Write_Program_Name;
41 Write_Str (" opts name ");
a71742a8 42 Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts] [-margs opts]}");
84481f76
RK
43 Write_Eol;
44 Write_Eol;
a71742a8
LG
45 Write_Str (" name is one or more file name from which you");
46 Write_Str (" can omit the .adb or .ads suffix");
84481f76
RK
47 Write_Eol;
48 Write_Eol;
49
50 -- GNATMAKE switches
51
52 Write_Str ("gnatmake switches:");
53 Write_Eol;
54
439b6dfa
AC
55 Display_Usage_Version_And_Help;
56
84481f76
RK
57 -- Line for -a
58
07fc65c4 59 Write_Str (" -a Consider all files, even readonly ali files");
84481f76
RK
60 Write_Eol;
61
7ffa903f
VC
62 -- Line for -b
63
07fc65c4 64 Write_Str (" -b Bind only");
7ffa903f
VC
65 Write_Eol;
66
91b1417d
AC
67 -- Line for -B
68
69 Write_Str (" -B Build, bind and link full project");
70 Write_Eol;
71
84481f76
RK
72 -- Line for -c
73
07fc65c4
GB
74 Write_Str (" -c Compile only");
75 Write_Eol;
76
77 -- Line for -C
78
79 Write_Str (" -C Cache source mappings: " &
fbf5a39b
AC
80 "invoke compiler with temp mapping file");
81 Write_Eol;
82
83 -- Line for -C=<mapping file>
84
85 Write_Str (" -C=mapp Cache source mappings: " &
86 "invoke compiler with mapping file mapp");
87 Write_Eol;
88
2735b82d
AC
89 -- Line for -d
90
91 Write_Str (" -d Display compilation progress");
92 Write_Eol;
93
fbf5a39b
AC
94 -- Line for -D
95
96 Write_Str (" -D dir Specify dir as the object directory");
84481f76
RK
97 Write_Eol;
98
aa720a54
AC
99 -- Line for -eI
100
101 Write_Str (" -eI Index of unit in multi-unit source file");
102 Write_Eol;
103
7324bf49
AC
104 -- Line for -eL
105
106 Write_Str (" -eL Follow symbolic links when processing " &
107 "project files");
108 Write_Eol;
109
958a816e
VC
110 -- Line for -eS
111
112 Write_Str (" -eS Echo commands to stdout instead of stderr");
113 Write_Eol;
114
84481f76
RK
115 -- Line for -f
116
07fc65c4 117 Write_Str (" -f Force recompilations of non predefined units");
84481f76
RK
118 Write_Eol;
119
fbf5a39b
AC
120 -- Line for -F
121
122 Write_Str (" -F Full project path name in brief error messages");
123 Write_Eol;
124
84481f76
RK
125 -- Line for -i
126
07fc65c4 127 Write_Str (" -i In place. Replace existing ali file, ");
84481f76
RK
128 Write_Str ("or put it with source");
129 Write_Eol;
130
131 -- Line for -jnnn
132
07fc65c4 133 Write_Str (" -jnum Use nnn processes to compile");
84481f76
RK
134 Write_Eol;
135
136 -- Line for -k
137
07fc65c4 138 Write_Str (" -k Keep going after compilation errors");
84481f76
RK
139 Write_Eol;
140
7ffa903f
VC
141 -- Line for -l
142
07fc65c4 143 Write_Str (" -l Link only");
7ffa903f
VC
144 Write_Eol;
145
84481f76
RK
146 -- Line for -m
147
07fc65c4 148 Write_Str (" -m Minimal recompilation");
84481f76
RK
149 Write_Eol;
150
151 -- Line for -M
152
07fc65c4 153 Write_Str (" -M List object file dependences for Makefile");
84481f76
RK
154 Write_Eol;
155
156 -- Line for -n
157
07fc65c4 158 Write_Str (" -n Check objects up to date, output next file ");
84481f76
RK
159 Write_Str ("to compile if not");
160 Write_Eol;
161
162 -- Line for -o
163
07fc65c4 164 Write_Str (" -o name Choose an alternate executable name");
84481f76
RK
165 Write_Eol;
166
958a816e
VC
167 -- Line for -p
168
169 Write_Str (" -p Create missing obj, lib and exec dirs");
170 Write_Eol;
171
84481f76
RK
172 -- Line for -P
173
07fc65c4 174 Write_Str (" -Pproj Use GNAT Project File proj");
84481f76
RK
175 Write_Eol;
176
177 -- Line for -q
178
07fc65c4 179 Write_Str (" -q Be quiet/terse");
84481f76
RK
180 Write_Eol;
181
fbf5a39b
AC
182 -- Line for -R
183
184 Write_Str (" -R Do not use a run_path_option when linking");
185 Write_Eol;
186
84481f76
RK
187 -- Line for -s
188
07fc65c4 189 Write_Str (" -s Recompile if compiler switches have changed");
84481f76
RK
190 Write_Eol;
191
192 -- Line for -u
193
64c69860 194 Write_Str (" -u Unique compilation, only compile the given files");
fbf5a39b
AC
195 Write_Eol;
196
197 -- Line for -U
198
199 Write_Str (" -U Unique compilation for all sources of all projects");
84481f76
RK
200 Write_Eol;
201
202 -- Line for -v
203
07fc65c4 204 Write_Str (" -v Display reasons for all (re)compilations");
84481f76
RK
205 Write_Eol;
206
f2acf80c
AC
207 -- Line for -vl
208
209 Write_Str (" -vl Verbose output (low verbosity)");
210 Write_Eol;
211
212 -- Line for -vm
213
214 Write_Str (" -vm Verbose output (medium verbosity)");
215 Write_Eol;
216
217 -- Line for -vh
218
219 Write_Str (" -vh Equivalent to -v (high verbosity)");
220 Write_Eol;
221
84481f76
RK
222 -- Line for -vPx
223
07fc65c4 224 Write_Str (" -vPx Specify verbosity when parsing GNAT Project Files");
84481f76
RK
225 Write_Eol;
226
958a816e
VC
227 -- Line for -we
228
a99ada67 229 Write_Str (" -we Treat all warnings as errors");
958a816e
VC
230 Write_Eol;
231
232 -- Line for -wn
233
a99ada67 234 Write_Str (" -wn Normal warning mode (cancels -we/-ws)");
958a816e
VC
235 Write_Eol;
236
237 -- Line for -ws
238
a99ada67 239 Write_Str (" -ws Suppress all warnings");
958a816e
VC
240 Write_Eol;
241
5950a3ac
AC
242 -- Line for -x
243
244 Write_Str (" -x " &
245 "Allow compilation of needed units external to the projects");
246 Write_Eol;
247
84481f76
RK
248 -- Line for -X
249
07fc65c4
GB
250 Write_Str (" -Xnm=val Specify an external reference for GNAT " &
251 "Project Files");
84481f76
RK
252 Write_Eol;
253
254 -- Line for -z
255
07fc65c4 256 Write_Str (" -z No main subprogram (zero main)");
84481f76
RK
257 Write_Eol;
258 Write_Eol;
73999267 259
406935b6
AC
260 Write_Str (" --create-map-file Create map file mainprog.map");
261 Write_Eol;
262
263 Write_Str (" --create-map-file=mapfile");
264 Write_Eol;
265 Write_Str (" Create map file mapfile");
266 Write_Eol;
267
b330e3c8
AC
268 Write_Str (" --keep-temp-files Keep temporary files");
269 Write_Eol;
270
84481f76
RK
271 Write_Str (" --GCC=command Use this gcc command");
272 Write_Eol;
273
274 Write_Str (" --GNATBIND=command Use this gnatbind command");
275 Write_Eol;
276
277 Write_Str (" --GNATLINK=command Use this gnatlink command");
278 Write_Eol;
279 Write_Eol;
280
281 -- Source and Library search path switches
282
a99ada67
RD
283 Write_Str ("Project, Source and Library search path switches:");
284 Write_Eol;
285
286 -- Line for -aP
287
288 Write_Str (" -aPdir Add directory dir to project search path");
84481f76
RK
289 Write_Eol;
290
291 -- Line for -aL
292
07fc65c4 293 Write_Str (" -aLdir Skip missing library sources if ali in dir");
84481f76
RK
294 Write_Eol;
295
296 -- Line for -A
297
07fc65c4 298 Write_Str (" -Adir like -aLdir -aIdir");
84481f76
RK
299 Write_Eol;
300
301 -- Line for -aO switch
302
07fc65c4 303 Write_Str (" -aOdir Specify library/object files search path");
84481f76
RK
304 Write_Eol;
305
306 -- Line for -aI switch
307
07fc65c4 308 Write_Str (" -aIdir Specify source files search path");
84481f76
RK
309 Write_Eol;
310
311 -- Line for -I switch
312
07fc65c4 313 Write_Str (" -Idir Like -aIdir -aOdir");
84481f76
RK
314 Write_Eol;
315
316 -- Line for -I- switch
317
07fc65c4 318 Write_Str (" -I- Don't look for sources & library files");
84481f76
RK
319 Write_Str (" in the default directory");
320 Write_Eol;
321
322 -- Line for -L
323
07fc65c4 324 Write_Str (" -Ldir Look for program libraries also in dir");
84481f76
RK
325 Write_Eol;
326
327 -- Line for -nostdinc
328
07fc65c4 329 Write_Str (" -nostdinc Don't look for sources");
84481f76
RK
330 Write_Str (" in the system default directory");
331 Write_Eol;
332
333 -- Line for -nostdlib
334
07fc65c4 335 Write_Str (" -nostdlib Don't look for library files");
84481f76
RK
336 Write_Str (" in the system default directory");
337 Write_Eol;
07fc65c4
GB
338
339 -- Line for --RTS
340
341 Write_Str (" --RTS=dir specify the default source and object search"
342 & " path");
343 Write_Eol;
68c3f02a
VC
344
345 -- Line for --subdirs=
346
347 Write_Str (" --subdirs=dir real obj/lib/exec dirs are subdirs");
348 Write_Eol;
eeb41f01 349
dfa8a067
VC
350 -- Line for --source-info=
351
352 Write_Str (" ");
315f0c42 353 Write_Str (Make_Util.Source_Info_Option);
dfa8a067
VC
354 Write_Str ("file specify a source info file");
355 Write_Eol;
356
eeb41f01
VC
357 -- Line for --unchecked-shared-lib-imports
358
359 Write_Str (" ");
315f0c42 360 Write_Str (Make_Util.Unchecked_Shared_Lib_Imports);
eeb41f01
VC
361 Write_Eol;
362 Write_Str (" Allow shared libraries to import static libraries");
363 Write_Eol;
84481f76
RK
364 Write_Eol;
365
366 -- General Compiler, Binder, Linker switches
367
368 Write_Str ("To pass an arbitrary switch to the Compiler, ");
369 Write_Str ("Binder or Linker:");
370 Write_Eol;
371
372 -- Line for -cargs
373
07fc65c4 374 Write_Str (" -cargs opts opts are passed to the compiler");
84481f76
RK
375 Write_Eol;
376
377 -- Line for -bargs
378
07fc65c4 379 Write_Str (" -bargs opts opts are passed to the binder");
84481f76
RK
380 Write_Eol;
381
382 -- Line for -largs
383
07fc65c4 384 Write_Str (" -largs opts opts are passed to the linker");
84481f76
RK
385 Write_Eol;
386
a71742a8
LG
387 -- Line for -margs
388
389 Write_Str (" -margs opts opts are passed to gnatmake");
390 Write_Eol;
391
84481f76
RK
392 -- Add usage information for gcc
393
394 Usage;
395
396end Makeusg;