OSDN Git Service

* Make-lang.in (gnat_ug_unx.info): Add dependency on stmp-docobjdir.
[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 --          Copyright (C) 1992-2001 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 ------------------------------------------------------------------------------
26
27 with Osint;  use Osint;
28 with Output; use Output;
29 with Usage;
30
31 procedure Makeusg is
32
33 --  Start of processing for Makeusg
34
35 begin
36    --  Usage line
37
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;
48
49    --  GNATMAKE switches
50
51    Write_Str ("gnatmake switches:");
52    Write_Eol;
53
54    --  Line for -a
55
56    Write_Str ("  -a       Consider all files, even readonly ali files");
57    Write_Eol;
58
59    --  Line for -b
60
61    Write_Str ("  -b       Bind only");
62    Write_Eol;
63
64    --  Line for -c
65
66    Write_Str ("  -c       Compile only");
67    Write_Eol;
68
69    --  Line for -C
70
71    Write_Str ("  -C       Cache source mappings: " &
72               "invoke the compiler with a mapping file");
73    Write_Eol;
74
75    --  Line for -f
76
77    Write_Str ("  -f       Force recompilations of non predefined units");
78    Write_Eol;
79
80    --  Line for -i
81
82    Write_Str ("  -i       In place. Replace existing ali file, ");
83    Write_Str ("or put it with source");
84    Write_Eol;
85
86    --  Line for -jnnn
87
88    Write_Str ("  -jnum    Use nnn processes to compile");
89    Write_Eol;
90
91    --  Line for -k
92
93    Write_Str ("  -k       Keep going after compilation errors");
94    Write_Eol;
95
96    --  Line for -l
97
98    Write_Str ("  -l       Link only");
99    Write_Eol;
100
101    --  Line for -m
102
103    Write_Str ("  -m       Minimal recompilation");
104    Write_Eol;
105
106    --  Line for -M
107
108    Write_Str ("  -M       List object file dependences for Makefile");
109    Write_Eol;
110
111    --  Line for -n
112
113    Write_Str ("  -n       Check objects up to date, output next file ");
114    Write_Str ("to compile if not");
115    Write_Eol;
116
117    --  Line for -o
118
119    Write_Str ("  -o name  Choose an alternate executable name");
120    Write_Eol;
121
122    --  Line for -P
123
124    Write_Str ("  -Pproj   Use GNAT Project File proj");
125    Write_Eol;
126
127    --  Line for -q
128
129    Write_Str ("  -q       Be quiet/terse");
130    Write_Eol;
131
132    --  Line for -s
133
134    Write_Str ("  -s       Recompile if compiler switches have changed");
135    Write_Eol;
136
137    --  Line for -u
138
139    Write_Str ("  -u       Unique compilation. Only compile the given file.");
140    Write_Eol;
141
142    --  Line for -v
143
144    Write_Str ("  -v       Display reasons for all (re)compilations");
145    Write_Eol;
146
147    --  Line for -vPx
148
149    Write_Str ("  -vPx     Specify verbosity when parsing GNAT Project Files");
150    Write_Eol;
151
152    --  Line for -X
153
154    Write_Str ("  -Xnm=val Specify an external reference for GNAT " &
155               "Project Files");
156    Write_Eol;
157
158    --  Line for -z
159
160    Write_Str ("  -z       No main subprogram (zero main)");
161    Write_Eol;
162    Write_Eol;
163
164    Write_Str ("  --GCC=command       Use this gcc command");
165    Write_Eol;
166
167    Write_Str ("  --GNATBIND=command  Use this gnatbind command");
168    Write_Eol;
169
170    Write_Str ("  --GNATLINK=command  Use this gnatlink command");
171    Write_Eol;
172    Write_Eol;
173
174    --  Source and Library search path switches
175
176    Write_Str ("Source and Library search path switches:");
177    Write_Eol;
178
179    --  Line for -aL
180
181    Write_Str ("  -aLdir    Skip missing library sources if ali in dir");
182    Write_Eol;
183
184    --  Line for -A
185
186    Write_Str ("  -Adir     like -aLdir -aIdir");
187    Write_Eol;
188
189    --  Line for -aO switch
190
191    Write_Str ("  -aOdir    Specify library/object files search path");
192    Write_Eol;
193
194    --  Line for -aI switch
195
196    Write_Str ("  -aIdir    Specify source files search path");
197    Write_Eol;
198
199    --  Line for -I switch
200
201    Write_Str ("  -Idir     Like -aIdir -aOdir");
202    Write_Eol;
203
204    --  Line for -I- switch
205
206    Write_Str ("  -I-       Don't look for sources & library files");
207    Write_Str (" in the default directory");
208    Write_Eol;
209
210    --  Line for -L
211
212    Write_Str ("  -Ldir     Look for program libraries also in dir");
213    Write_Eol;
214
215    --  Line for -nostdinc
216
217    Write_Str ("  -nostdinc Don't look for sources");
218    Write_Str (" in the system default directory");
219    Write_Eol;
220
221    --  Line for -nostdlib
222
223    Write_Str ("  -nostdlib Don't look for library files");
224    Write_Str (" in the system default directory");
225    Write_Eol;
226
227    --  Line for --RTS
228
229    Write_Str ("  --RTS=dir specify the default source and object search"
230               & " path");
231    Write_Eol;
232    Write_Eol;
233
234    --  General Compiler, Binder, Linker switches
235
236    Write_Str ("To pass an arbitrary switch to the Compiler, ");
237    Write_Str ("Binder or Linker:");
238    Write_Eol;
239
240    --  Line for -cargs
241
242    Write_Str ("  -cargs opts   opts are passed to the compiler");
243    Write_Eol;
244
245    --  Line for -bargs
246
247    Write_Str ("  -bargs opts   opts are passed to the binder");
248    Write_Eol;
249
250    --  Line for -largs
251
252    Write_Str ("  -largs opts   opts are passed to the linker");
253    Write_Eol;
254
255    --  Line for -margs
256
257    Write_Str ("  -margs opts   opts are passed to gnatmake");
258    Write_Eol;
259
260    --  Add usage information for gcc
261
262    Usage;
263
264 end Makeusg;