PR testsuite/44195
[official-gcc.git] / gcc / ada / makeusg.adb
blob7f8ddb6163d47ee34e18dc103ba61c5eaadf31e7
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-2010, 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 ------------------------------------------------------------------------------
26 with Makeutl;
27 with Osint; use Osint;
28 with Output; use Output;
29 with Usage;
31 procedure Makeusg is
33 -- Start of processing for Makeusg
35 begin
36 -- Usage line
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;
49 -- GNATMAKE switches
51 Write_Str ("gnatmake switches:");
52 Write_Eol;
54 -- Line for -a
56 Write_Str (" -a Consider all files, even readonly ali files");
57 Write_Eol;
59 -- Line for -b
61 Write_Str (" -b Bind only");
62 Write_Eol;
64 -- Line for -B
66 Write_Str (" -B Build, bind and link full project");
67 Write_Eol;
69 -- Line for -c
71 Write_Str (" -c Compile only");
72 Write_Eol;
74 -- Line for -C
76 Write_Str (" -C Cache source mappings: " &
77 "invoke compiler with temp mapping file");
78 Write_Eol;
80 -- Line for -C=<mapping file>
82 Write_Str (" -C=mapp Cache source mappings: " &
83 "invoke compiler with mapping file mapp");
84 Write_Eol;
86 -- Line for -D
88 Write_Str (" -D dir Specify dir as the object directory");
89 Write_Eol;
91 -- Line for -eI
93 Write_Str (" -eI Index of unit in multi-unit source file");
94 Write_Eol;
96 -- Line for -eL
98 Write_Str (" -eL Follow symbolic links when processing " &
99 "project files");
100 Write_Eol;
102 -- Line for -eS
104 Write_Str (" -eS Echo commands to stdout instead of stderr");
105 Write_Eol;
107 -- Line for -f
109 Write_Str (" -f Force recompilations of non predefined units");
110 Write_Eol;
112 -- Line for -F
114 Write_Str (" -F Full project path name in brief error messages");
115 Write_Eol;
117 -- Line for -i
119 Write_Str (" -i In place. Replace existing ali file, ");
120 Write_Str ("or put it with source");
121 Write_Eol;
123 -- Line for -jnnn
125 Write_Str (" -jnum Use nnn processes to compile");
126 Write_Eol;
128 -- Line for -k
130 Write_Str (" -k Keep going after compilation errors");
131 Write_Eol;
133 -- Line for -l
135 Write_Str (" -l Link only");
136 Write_Eol;
138 -- Line for -m
140 Write_Str (" -m Minimal recompilation");
141 Write_Eol;
143 -- Line for -M
145 Write_Str (" -M List object file dependences for Makefile");
146 Write_Eol;
148 -- Line for -n
150 Write_Str (" -n Check objects up to date, output next file ");
151 Write_Str ("to compile if not");
152 Write_Eol;
154 -- Line for -o
156 Write_Str (" -o name Choose an alternate executable name");
157 Write_Eol;
159 -- Line for -p
161 Write_Str (" -p Create missing obj, lib and exec dirs");
162 Write_Eol;
164 -- Line for -P
166 Write_Str (" -Pproj Use GNAT Project File proj");
167 Write_Eol;
169 -- Line for -q
171 Write_Str (" -q Be quiet/terse");
172 Write_Eol;
174 -- Line for -R
176 Write_Str (" -R Do not use a run_path_option when linking");
177 Write_Eol;
179 -- Line for -s
181 Write_Str (" -s Recompile if compiler switches have changed");
182 Write_Eol;
184 -- Line for -u
186 Write_Str (" -u Unique compilation, only compile the given files");
187 Write_Eol;
189 -- Line for -U
191 Write_Str (" -U Unique compilation for all sources of all projects");
192 Write_Eol;
194 -- Line for -v
196 Write_Str (" -v Display reasons for all (re)compilations");
197 Write_Eol;
199 -- Line for -vPx
201 Write_Str (" -vPx Specify verbosity when parsing GNAT Project Files");
202 Write_Eol;
204 -- Line for -we
206 Write_Str (" -we Treat all warnings as errors");
207 Write_Eol;
209 -- Line for -wn
211 Write_Str (" -wn Normal warning mode (cancels -we/-ws)");
212 Write_Eol;
214 -- Line for -ws
216 Write_Str (" -ws Suppress all warnings");
217 Write_Eol;
219 -- Line for -x
221 Write_Str (" -x " &
222 "Allow compilation of needed units external to the projects");
223 Write_Eol;
225 -- Line for -X
227 Write_Str (" -Xnm=val Specify an external reference for GNAT " &
228 "Project Files");
229 Write_Eol;
231 -- Line for -z
233 Write_Str (" -z No main subprogram (zero main)");
234 Write_Eol;
235 Write_Eol;
237 Write_Str (" --GCC=command Use this gcc command");
238 Write_Eol;
240 Write_Str (" --GNATBIND=command Use this gnatbind command");
241 Write_Eol;
243 Write_Str (" --GNATLINK=command Use this gnatlink command");
244 Write_Eol;
245 Write_Eol;
247 -- Source and Library search path switches
249 Write_Str ("Project, Source and Library search path switches:");
250 Write_Eol;
252 -- Line for -aP
254 Write_Str (" -aPdir Add directory dir to project search path");
255 Write_Eol;
257 -- Line for -aL
259 Write_Str (" -aLdir Skip missing library sources if ali in dir");
260 Write_Eol;
262 -- Line for -A
264 Write_Str (" -Adir like -aLdir -aIdir");
265 Write_Eol;
267 -- Line for -aO switch
269 Write_Str (" -aOdir Specify library/object files search path");
270 Write_Eol;
272 -- Line for -aI switch
274 Write_Str (" -aIdir Specify source files search path");
275 Write_Eol;
277 -- Line for -I switch
279 Write_Str (" -Idir Like -aIdir -aOdir");
280 Write_Eol;
282 -- Line for -I- switch
284 Write_Str (" -I- Don't look for sources & library files");
285 Write_Str (" in the default directory");
286 Write_Eol;
288 -- Line for -L
290 Write_Str (" -Ldir Look for program libraries also in dir");
291 Write_Eol;
293 -- Line for -nostdinc
295 Write_Str (" -nostdinc Don't look for sources");
296 Write_Str (" in the system default directory");
297 Write_Eol;
299 -- Line for -nostdlib
301 Write_Str (" -nostdlib Don't look for library files");
302 Write_Str (" in the system default directory");
303 Write_Eol;
305 -- Line for --RTS
307 Write_Str (" --RTS=dir specify the default source and object search"
308 & " path");
309 Write_Eol;
311 -- Line for --subdirs=
313 Write_Str (" --subdirs=dir real obj/lib/exec dirs are subdirs");
314 Write_Eol;
316 -- Line for --unchecked-shared-lib-imports
318 Write_Str (" ");
319 Write_Str (Makeutl.Unchecked_Shared_Lib_Imports);
320 Write_Eol;
321 Write_Str (" Allow shared libraries to import static libraries");
322 Write_Eol;
323 Write_Eol;
325 -- General Compiler, Binder, Linker switches
327 Write_Str ("To pass an arbitrary switch to the Compiler, ");
328 Write_Str ("Binder or Linker:");
329 Write_Eol;
331 -- Line for -cargs
333 Write_Str (" -cargs opts opts are passed to the compiler");
334 Write_Eol;
336 -- Line for -bargs
338 Write_Str (" -bargs opts opts are passed to the binder");
339 Write_Eol;
341 -- Line for -largs
343 Write_Str (" -largs opts opts are passed to the linker");
344 Write_Eol;
346 -- Line for -margs
348 Write_Str (" -margs opts opts are passed to gnatmake");
349 Write_Eol;
351 -- Add usage information for gcc
353 Usage;
355 end Makeusg;