2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / ada / makeusg.adb
blob13ba0e50fbc046dc9584c5e5e38628a2c8facf27
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-2003 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, 59 Temple Place - Suite 330, Boston, --
20 -- MA 02111-1307, 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 -c
66 Write_Str (" -c Compile only");
67 Write_Eol;
69 -- Line for -C
71 Write_Str (" -C Cache source mappings: " &
72 "invoke compiler with temp mapping file");
73 Write_Eol;
75 -- Line for -C=<mapping file>
77 Write_Str (" -C=mapp Cache source mappings: " &
78 "invoke compiler with mapping file mapp");
79 Write_Eol;
81 -- Line for -D
83 Write_Str (" -D dir Specify dir as the object directory");
84 Write_Eol;
86 -- Line for -f
88 Write_Str (" -f Force recompilations of non predefined units");
89 Write_Eol;
91 -- Line for -F
93 Write_Str (" -F Full project path name in brief error messages");
94 Write_Eol;
96 -- Line for -i
98 Write_Str (" -i In place. Replace existing ali file, ");
99 Write_Str ("or put it with source");
100 Write_Eol;
102 -- Line for -jnnn
104 Write_Str (" -jnum Use nnn processes to compile");
105 Write_Eol;
107 -- Line for -k
109 Write_Str (" -k Keep going after compilation errors");
110 Write_Eol;
112 -- Line for -l
114 Write_Str (" -l Link only");
115 Write_Eol;
117 -- Line for -m
119 Write_Str (" -m Minimal recompilation");
120 Write_Eol;
122 -- Line for -M
124 Write_Str (" -M List object file dependences for Makefile");
125 Write_Eol;
127 -- Line for -n
129 Write_Str (" -n Check objects up to date, output next file ");
130 Write_Str ("to compile if not");
131 Write_Eol;
133 -- Line for -o
135 Write_Str (" -o name Choose an alternate executable name");
136 Write_Eol;
138 -- Line for -P
140 Write_Str (" -Pproj Use GNAT Project File proj");
141 Write_Eol;
143 -- Line for -q
145 Write_Str (" -q Be quiet/terse");
146 Write_Eol;
148 -- Line for -R
150 Write_Str (" -R Do not use a run_path_option when linking");
151 Write_Eol;
153 -- Line for -s
155 Write_Str (" -s Recompile if compiler switches have changed");
156 Write_Eol;
158 -- Line for -u
160 Write_Str (" -u Unique compilation. Only compile the given files.");
161 Write_Eol;
163 -- Line for -U
165 Write_Str (" -U Unique compilation for all sources of all projects");
166 Write_Eol;
168 -- Line for -v
170 Write_Str (" -v Display reasons for all (re)compilations");
171 Write_Eol;
173 -- Line for -vPx
175 Write_Str (" -vPx Specify verbosity when parsing GNAT Project Files");
176 Write_Eol;
178 -- Line for -X
180 Write_Str (" -Xnm=val Specify an external reference for GNAT " &
181 "Project Files");
182 Write_Eol;
184 -- Line for -z
186 Write_Str (" -z No main subprogram (zero main)");
187 Write_Eol;
188 Write_Eol;
190 Write_Str (" --GCC=command Use this gcc command");
191 Write_Eol;
193 Write_Str (" --GNATBIND=command Use this gnatbind command");
194 Write_Eol;
196 Write_Str (" --GNATLINK=command Use this gnatlink command");
197 Write_Eol;
198 Write_Eol;
200 -- Source and Library search path switches
202 Write_Str ("Source and Library search path switches:");
203 Write_Eol;
205 -- Line for -aL
207 Write_Str (" -aLdir Skip missing library sources if ali in dir");
208 Write_Eol;
210 -- Line for -A
212 Write_Str (" -Adir like -aLdir -aIdir");
213 Write_Eol;
215 -- Line for -aO switch
217 Write_Str (" -aOdir Specify library/object files search path");
218 Write_Eol;
220 -- Line for -aI switch
222 Write_Str (" -aIdir Specify source files search path");
223 Write_Eol;
225 -- Line for -I switch
227 Write_Str (" -Idir Like -aIdir -aOdir");
228 Write_Eol;
230 -- Line for -I- switch
232 Write_Str (" -I- Don't look for sources & library files");
233 Write_Str (" in the default directory");
234 Write_Eol;
236 -- Line for -L
238 Write_Str (" -Ldir Look for program libraries also in dir");
239 Write_Eol;
241 -- Line for -nostdinc
243 Write_Str (" -nostdinc Don't look for sources");
244 Write_Str (" in the system default directory");
245 Write_Eol;
247 -- Line for -nostdlib
249 Write_Str (" -nostdlib Don't look for library files");
250 Write_Str (" in the system default directory");
251 Write_Eol;
253 -- Line for --RTS
255 Write_Str (" --RTS=dir specify the default source and object search"
256 & " path");
257 Write_Eol;
258 Write_Eol;
260 -- General Compiler, Binder, Linker switches
262 Write_Str ("To pass an arbitrary switch to the Compiler, ");
263 Write_Str ("Binder or Linker:");
264 Write_Eol;
266 -- Line for -cargs
268 Write_Str (" -cargs opts opts are passed to the compiler");
269 Write_Eol;
271 -- Line for -bargs
273 Write_Str (" -bargs opts opts are passed to the binder");
274 Write_Eol;
276 -- Line for -largs
278 Write_Str (" -largs opts opts are passed to the linker");
279 Write_Eol;
281 -- Line for -margs
283 Write_Str (" -margs opts opts are passed to gnatmake");
284 Write_Eol;
286 -- Add usage information for gcc
288 Usage;
290 end Makeusg;