1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- M A K E U S G --
-- --
-- B o d y --
-- --
-- $Revision: 1.14 $
-- --
-- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
with Osint; use Osint;
with Output; use Output;
with Usage;
procedure Makeusg is
procedure Write_Switch_Char;
-- Write two spaces followed by appropriate switch character
procedure Write_Switch_Char is
begin
Write_Str (" ");
Write_Char (Switch_Character);
end Write_Switch_Char;
-- Start of processing for Makeusg
begin
-- Usage line
Write_Str ("Usage: ");
Osint.Write_Program_Name;
Write_Str (" opts name ");
Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts]}");
Write_Eol;
Write_Eol;
Write_Str (" name is a file name from which you can omit the");
Write_Str (" .adb or .ads suffix");
Write_Eol;
Write_Eol;
-- GNATMAKE switches
Write_Str ("gnatmake switches:");
Write_Eol;
-- Line for -a
Write_Switch_Char;
Write_Str ("a Consider all files, even readonly ali files");
Write_Eol;
-- Line for -c
Write_Switch_Char;
Write_Str ("c Compile only, do not bind and link");
Write_Eol;
-- Line for -f
Write_Switch_Char;
Write_Str ("f Force recompilations of non predefined units");
Write_Eol;
-- Line for -i
Write_Switch_Char;
Write_Str ("i In place. Replace existing ali file, ");
Write_Str ("or put it with source");
Write_Eol;
-- Line for -jnnn
Write_Switch_Char;
Write_Str ("jnum Use nnn processes to compile");
Write_Eol;
-- Line for -k
Write_Switch_Char;
Write_Str ("k Keep going after compilation errors");
Write_Eol;
-- Line for -m
Write_Switch_Char;
Write_Str ("m Minimal recompilation");
Write_Eol;
-- Line for -M
Write_Switch_Char;
Write_Str ("M List object file dependences for Makefile");
Write_Eol;
-- Line for -n
Write_Switch_Char;
Write_Str ("n Check objects up to date, output next file ");
Write_Str ("to compile if not");
Write_Eol;
-- Line for -o
Write_Switch_Char;
Write_Str ("o name Choose an alternate executable name");
Write_Eol;
-- Line for -P
Write_Switch_Char;
Write_Str ("Pproj Use GNAT Project File proj");
Write_Eol;
-- Line for -q
Write_Switch_Char;
Write_Str ("q Be quiet/terse");
Write_Eol;
-- Line for -s
Write_Switch_Char;
Write_Str ("s Recompile if compiler switches have changed");
Write_Eol;
-- Line for -u
Write_Switch_Char;
Write_Str ("u Unique compilation. Only compile the given file.");
Write_Eol;
-- Line for -v
Write_Switch_Char;
Write_Str ("v Display reasons for all (re)compilations");
Write_Eol;
-- Line for -vPx
Write_Switch_Char;
Write_Str ("vPx Specify verbosity when parsing GNAT Project Files");
Write_Eol;
-- Line for -X
Write_Switch_Char;
Write_Str ("Xnm=val Specify an external reference for GNAT Project Files");
Write_Eol;
-- Line for -z
Write_Switch_Char;
Write_Str ("z No main subprogram (zero main)");
Write_Eol;
Write_Eol;
Write_Str (" --GCC=command Use this gcc command");
Write_Eol;
Write_Str (" --GNATBIND=command Use this gnatbind command");
Write_Eol;
Write_Str (" --GNATLINK=command Use this gnatlink command");
Write_Eol;
Write_Eol;
-- Source and Library search path switches
Write_Str ("Source and Library search path switches:");
Write_Eol;
-- Line for -aL
Write_Switch_Char;
Write_Str ("aLdir Skip missing library sources if ali in dir");
Write_Eol;
-- Line for -A
Write_Switch_Char;
Write_Str ("Adir like -aLdir -aIdir");
Write_Eol;
-- Line for -aO switch
Write_Switch_Char;
Write_Str ("aOdir Specify library/object files search path");
Write_Eol;
-- Line for -aI switch
Write_Switch_Char;
Write_Str ("aIdir Specify source files search path");
Write_Eol;
-- Line for -I switch
Write_Switch_Char;
Write_Str ("Idir Like -aIdir -aOdir");
Write_Eol;
-- Line for -I- switch
Write_Switch_Char;
Write_Str ("I- Don't look for sources & library files");
Write_Str (" in the default directory");
Write_Eol;
-- Line for -L
Write_Switch_Char;
Write_Str ("Ldir Look for program libraries also in dir");
Write_Eol;
-- Line for -nostdinc
Write_Switch_Char;
Write_Str ("nostdinc Don't look for sources");
Write_Str (" in the system default directory");
Write_Eol;
-- Line for -nostdlib
Write_Switch_Char;
Write_Str ("nostdlib Don't look for library files");
Write_Str (" in the system default directory");
Write_Eol;
Write_Eol;
-- General Compiler, Binder, Linker switches
Write_Str ("To pass an arbitrary switch to the Compiler, ");
Write_Str ("Binder or Linker:");
Write_Eol;
-- Line for -cargs
Write_Switch_Char;
Write_Str ("cargs opts opts are passed to the compiler");
Write_Eol;
-- Line for -bargs
Write_Switch_Char;
Write_Str ("bargs opts opts are passed to the binder");
Write_Eol;
-- Line for -largs
Write_Switch_Char;
Write_Str ("largs opts opts are passed to the linker");
Write_Eol;
-- Add usage information for gcc
Usage;
end Makeusg;
|