Debian Codegraph @

gcc/ada/makeusg.adb

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