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