gcc:
[official-gcc.git] / gcc / ada / makeusg.adb
blob5dc0604cd3b9f4dc934c3501c50d9bdd10180b40
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-2006, 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, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, 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 ------------------------------------------------------------------------------
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 -f
104 Write_Str (" -f Force recompilations of non predefined units");
105 Write_Eol;
107 -- Line for -F
109 Write_Str (" -F Full project path name in brief error messages");
110 Write_Eol;
112 -- Line for -i
114 Write_Str (" -i In place. Replace existing ali file, ");
115 Write_Str ("or put it with source");
116 Write_Eol;
118 -- Line for -jnnn
120 Write_Str (" -jnum Use nnn processes to compile");
121 Write_Eol;
123 -- Line for -k
125 Write_Str (" -k Keep going after compilation errors");
126 Write_Eol;
128 -- Line for -l
130 Write_Str (" -l Link only");
131 Write_Eol;
133 -- Line for -m
135 Write_Str (" -m Minimal recompilation");
136 Write_Eol;
138 -- Line for -M
140 Write_Str (" -M List object file dependences for Makefile");
141 Write_Eol;
143 -- Line for -n
145 Write_Str (" -n Check objects up to date, output next file ");
146 Write_Str ("to compile if not");
147 Write_Eol;
149 -- Line for -o
151 Write_Str (" -o name Choose an alternate executable name");
152 Write_Eol;
154 -- Line for -P
156 Write_Str (" -Pproj Use GNAT Project File proj");
157 Write_Eol;
159 -- Line for -q
161 Write_Str (" -q Be quiet/terse");
162 Write_Eol;
164 -- Line for -R
166 Write_Str (" -R Do not use a run_path_option when linking");
167 Write_Eol;
169 -- Line for -s
171 Write_Str (" -s Recompile if compiler switches have changed");
172 Write_Eol;
174 -- Line for -S
176 Write_Str (" -S Echo commands to stdout instead of stderr");
178 -- Line for -u
180 Write_Str (" -u Unique compilation, only compile the given files");
181 Write_Eol;
183 -- Line for -U
185 Write_Str (" -U Unique compilation for all sources of all projects");
186 Write_Eol;
188 -- Line for -v
190 Write_Str (" -v Display reasons for all (re)compilations");
191 Write_Eol;
193 -- Line for -vPx
195 Write_Str (" -vPx Specify verbosity when parsing GNAT Project Files");
196 Write_Eol;
198 -- Line for -x
200 Write_Str (" -x " &
201 "Allow compilation of needed units external to the projects");
202 Write_Eol;
204 -- Line for -X
206 Write_Str (" -Xnm=val Specify an external reference for GNAT " &
207 "Project Files");
208 Write_Eol;
210 -- Line for -z
212 Write_Str (" -z No main subprogram (zero main)");
213 Write_Eol;
214 Write_Eol;
216 Write_Str (" --GCC=command Use this gcc command");
217 Write_Eol;
219 Write_Str (" --GNATBIND=command Use this gnatbind command");
220 Write_Eol;
222 Write_Str (" --GNATLINK=command Use this gnatlink command");
223 Write_Eol;
224 Write_Eol;
226 -- Source and Library search path switches
228 Write_Str ("Source and Library search path switches:");
229 Write_Eol;
231 -- Line for -aL
233 Write_Str (" -aLdir Skip missing library sources if ali in dir");
234 Write_Eol;
236 -- Line for -A
238 Write_Str (" -Adir like -aLdir -aIdir");
239 Write_Eol;
241 -- Line for -aO switch
243 Write_Str (" -aOdir Specify library/object files search path");
244 Write_Eol;
246 -- Line for -aI switch
248 Write_Str (" -aIdir Specify source files search path");
249 Write_Eol;
251 -- Line for -I switch
253 Write_Str (" -Idir Like -aIdir -aOdir");
254 Write_Eol;
256 -- Line for -I- switch
258 Write_Str (" -I- Don't look for sources & library files");
259 Write_Str (" in the default directory");
260 Write_Eol;
262 -- Line for -L
264 Write_Str (" -Ldir Look for program libraries also in dir");
265 Write_Eol;
267 -- Line for -nostdinc
269 Write_Str (" -nostdinc Don't look for sources");
270 Write_Str (" in the system default directory");
271 Write_Eol;
273 -- Line for -nostdlib
275 Write_Str (" -nostdlib Don't look for library files");
276 Write_Str (" in the system default directory");
277 Write_Eol;
279 -- Line for --RTS
281 Write_Str (" --RTS=dir specify the default source and object search"
282 & " path");
283 Write_Eol;
284 Write_Eol;
286 -- General Compiler, Binder, Linker switches
288 Write_Str ("To pass an arbitrary switch to the Compiler, ");
289 Write_Str ("Binder or Linker:");
290 Write_Eol;
292 -- Line for -cargs
294 Write_Str (" -cargs opts opts are passed to the compiler");
295 Write_Eol;
297 -- Line for -bargs
299 Write_Str (" -bargs opts opts are passed to the binder");
300 Write_Eol;
302 -- Line for -largs
304 Write_Str (" -largs opts opts are passed to the linker");
305 Write_Eol;
307 -- Line for -margs
309 Write_Str (" -margs opts opts are passed to gnatmake");
310 Write_Eol;
312 -- Add usage information for gcc
314 Usage;
316 end Makeusg;