2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / ada / makeusg.adb
blobca22dceec9cd982253adbb9d3ed85be4a9942416
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-2008, 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 Osint; use Osint;
27 with Output; use Output;
28 with Usage;
30 procedure Makeusg is
32 -- Start of processing for Makeusg
34 begin
35 -- Usage line
37 Write_Str ("Usage: ");
38 Osint.Write_Program_Name;
39 Write_Str (" opts name ");
40 Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts] [-margs opts]}");
41 Write_Eol;
42 Write_Eol;
43 Write_Str (" name is one or more file name from which you");
44 Write_Str (" can omit the .adb or .ads suffix");
45 Write_Eol;
46 Write_Eol;
48 -- GNATMAKE switches
50 Write_Str ("gnatmake switches:");
51 Write_Eol;
53 -- Line for -a
55 Write_Str (" -a Consider all files, even readonly ali files");
56 Write_Eol;
58 -- Line for -b
60 Write_Str (" -b Bind only");
61 Write_Eol;
63 -- Line for -B
65 Write_Str (" -B Build, bind and link full project");
66 Write_Eol;
68 -- Line for -c
70 Write_Str (" -c Compile only");
71 Write_Eol;
73 -- Line for -C
75 Write_Str (" -C Cache source mappings: " &
76 "invoke compiler with temp mapping file");
77 Write_Eol;
79 -- Line for -C=<mapping file>
81 Write_Str (" -C=mapp Cache source mappings: " &
82 "invoke compiler with mapping file mapp");
83 Write_Eol;
85 -- Line for -D
87 Write_Str (" -D dir Specify dir as the object directory");
88 Write_Eol;
90 -- Line for -eI
92 Write_Str (" -eI Index of unit in multi-unit source file");
93 Write_Eol;
95 -- Line for -eL
97 Write_Str (" -eL Follow symbolic links when processing " &
98 "project files");
99 Write_Eol;
101 -- Line for -eS
103 Write_Str (" -eS Echo commands to stdout instead of stderr");
104 Write_Eol;
106 -- Line for -f
108 Write_Str (" -f Force recompilations of non predefined units");
109 Write_Eol;
111 -- Line for -F
113 Write_Str (" -F Full project path name in brief error messages");
114 Write_Eol;
116 -- Line for -i
118 Write_Str (" -i In place. Replace existing ali file, ");
119 Write_Str ("or put it with source");
120 Write_Eol;
122 -- Line for -jnnn
124 Write_Str (" -jnum Use nnn processes to compile");
125 Write_Eol;
127 -- Line for -k
129 Write_Str (" -k Keep going after compilation errors");
130 Write_Eol;
132 -- Line for -l
134 Write_Str (" -l Link only");
135 Write_Eol;
137 -- Line for -m
139 Write_Str (" -m Minimal recompilation");
140 Write_Eol;
142 -- Line for -M
144 Write_Str (" -M List object file dependences for Makefile");
145 Write_Eol;
147 -- Line for -n
149 Write_Str (" -n Check objects up to date, output next file ");
150 Write_Str ("to compile if not");
151 Write_Eol;
153 -- Line for -o
155 Write_Str (" -o name Choose an alternate executable name");
156 Write_Eol;
158 -- Line for -p
160 Write_Str (" -p Create missing obj, lib and exec dirs");
161 Write_Eol;
163 -- Line for -P
165 Write_Str (" -Pproj Use GNAT Project File proj");
166 Write_Eol;
168 -- Line for -q
170 Write_Str (" -q Be quiet/terse");
171 Write_Eol;
173 -- Line for -R
175 Write_Str (" -R Do not use a run_path_option when linking");
176 Write_Eol;
178 -- Line for -s
180 Write_Str (" -s Recompile if compiler switches have changed");
181 Write_Eol;
183 -- Line for -u
185 Write_Str (" -u Unique compilation, only compile the given files");
186 Write_Eol;
188 -- Line for -U
190 Write_Str (" -U Unique compilation for all sources of all projects");
191 Write_Eol;
193 -- Line for -v
195 Write_Str (" -v Display reasons for all (re)compilations");
196 Write_Eol;
198 -- Line for -vPx
200 Write_Str (" -vPx Specify verbosity when parsing GNAT Project Files");
201 Write_Eol;
203 -- Line for -we
205 Write_Str (" -we Treat all warnings as errors");
206 Write_Eol;
208 -- Line for -wn
210 Write_Str (" -wn Normal warning mode (cancels -we/-ws)");
211 Write_Eol;
213 -- Line for -ws
215 Write_Str (" -ws Suppress all warnings");
216 Write_Eol;
218 -- Line for -x
220 Write_Str (" -x " &
221 "Allow compilation of needed units external to the projects");
222 Write_Eol;
224 -- Line for -X
226 Write_Str (" -Xnm=val Specify an external reference for GNAT " &
227 "Project Files");
228 Write_Eol;
230 -- Line for -z
232 Write_Str (" -z No main subprogram (zero main)");
233 Write_Eol;
234 Write_Eol;
236 Write_Str (" --GCC=command Use this gcc command");
237 Write_Eol;
239 Write_Str (" --GNATBIND=command Use this gnatbind command");
240 Write_Eol;
242 Write_Str (" --GNATLINK=command Use this gnatlink command");
243 Write_Eol;
244 Write_Eol;
246 -- Source and Library search path switches
248 Write_Str ("Project, Source and Library search path switches:");
249 Write_Eol;
251 -- Line for -aP
253 Write_Str (" -aPdir Add directory dir to project search path");
254 Write_Eol;
256 -- Line for -aL
258 Write_Str (" -aLdir Skip missing library sources if ali in dir");
259 Write_Eol;
261 -- Line for -A
263 Write_Str (" -Adir like -aLdir -aIdir");
264 Write_Eol;
266 -- Line for -aO switch
268 Write_Str (" -aOdir Specify library/object files search path");
269 Write_Eol;
271 -- Line for -aI switch
273 Write_Str (" -aIdir Specify source files search path");
274 Write_Eol;
276 -- Line for -I switch
278 Write_Str (" -Idir Like -aIdir -aOdir");
279 Write_Eol;
281 -- Line for -I- switch
283 Write_Str (" -I- Don't look for sources & library files");
284 Write_Str (" in the default directory");
285 Write_Eol;
287 -- Line for -L
289 Write_Str (" -Ldir Look for program libraries also in dir");
290 Write_Eol;
292 -- Line for -nostdinc
294 Write_Str (" -nostdinc Don't look for sources");
295 Write_Str (" in the system default directory");
296 Write_Eol;
298 -- Line for -nostdlib
300 Write_Str (" -nostdlib Don't look for library files");
301 Write_Str (" in the system default directory");
302 Write_Eol;
304 -- Line for --RTS
306 Write_Str (" --RTS=dir specify the default source and object search"
307 & " path");
308 Write_Eol;
310 -- Line for --subdirs=
312 Write_Str (" --subdirs=dir real obj/lib/exec dirs are subdirs");
313 Write_Eol;
314 Write_Eol;
316 -- General Compiler, Binder, Linker switches
318 Write_Str ("To pass an arbitrary switch to the Compiler, ");
319 Write_Str ("Binder or Linker:");
320 Write_Eol;
322 -- Line for -cargs
324 Write_Str (" -cargs opts opts are passed to the compiler");
325 Write_Eol;
327 -- Line for -bargs
329 Write_Str (" -bargs opts opts are passed to the binder");
330 Write_Eol;
332 -- Line for -largs
334 Write_Str (" -largs opts opts are passed to the linker");
335 Write_Eol;
337 -- Line for -margs
339 Write_Str (" -margs opts opts are passed to gnatmake");
340 Write_Eol;
342 -- Add usage information for gcc
344 Usage;
346 end Makeusg;