OSDN Git Service

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