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