OSDN Git Service

New file.
[pf3gnuchains/gcc-fork.git] / gcc / ada / bindusg.adb
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                             B I N D U S G                                --
6 --                                                                          --
7 --                                B o d y                                   --
8 --                                                                          --
9 --          Copyright (C) 1992-2006, 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,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, 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
30 package body Bindusg is
31
32    Already_Displayed : Boolean := False;
33    --  Set True if Display called, used to avoid showing usage information
34    --  more than once.
35
36    -------------
37    -- Display --
38    -------------
39
40    procedure Display is
41    begin
42       if Already_Displayed then
43          return;
44       else
45          Already_Displayed := True;
46       end if;
47
48       --  Usage line
49
50       Write_Str ("Usage: ");
51       Write_Program_Name;
52       Write_Char (' ');
53       Write_Str ("switches lfile");
54       Write_Eol;
55       Write_Eol;
56
57       --  Line for -aO switch
58
59       Write_Line ("  -aOdir    Specify library files search path");
60
61       --  Line for -aI switch
62
63       Write_Line ("  -aIdir    Specify source files search path");
64
65       --  Line for a switch
66
67       Write_Line ("  -a        Automatically initialize elaboration " &
68                   "procedure");
69
70       --  Line for A switch
71
72       Write_Line ("  -A        Generate binder program in Ada (default)");
73
74       --  Line for -b switch
75
76       Write_Line ("  -b        Generate brief messages to stderr " &
77                   "even if verbose mode set");
78
79       --  Line for -c switch
80
81       Write_Line ("  -c        Check only, no generation of " &
82                   "binder output file");
83
84       --  Line for C switch
85
86       Write_Line ("  -C        Generate binder program in C");
87
88       --  Line for -d switch
89
90       Write_Line ("  -dnn[k|m] Default primary stack " &
91                   "size = nn [kilo|mega] bytes");
92
93       --  Line for D switch
94
95       Write_Line ("  -Dnn[k|m] Default secondary stack " &
96                   "size = nnn [kilo|mega] bytes");
97
98       --  Line for -e switch
99
100       Write_Line ("  -e        Output complete list of elaboration " &
101                   "order dependencies");
102
103       --  Line for -E switch
104
105       Write_Line ("  -E        Store tracebacks in Exception occurrences");
106
107       --  The -f switch is voluntarily omitted, because it is obsolete
108
109       --  Line for -F switch
110
111       Write_Line ("  -F        Force checking of elaboration Flags");
112
113       --  Line for -h switch
114
115       Write_Line ("  -h        Output this usage (help) information");
116
117       --  Lines for -I switch
118
119       Write_Line ("  -Idir     Specify library and source files search path");
120       Write_Line ("  -I-       Don't look for sources & library files " &
121                   "in default directory");
122
123       --  Line for -K switch
124
125       Write_Line ("  -K        Give list of linker options specified " &
126                   "for link");
127
128       --  Line for -l switch
129
130       Write_Line ("  -l        Output chosen elaboration order");
131
132       --  Line of -L switch
133
134       Write_Line ("  -Lxyz     Library build: adainit/final " &
135                   "renamed to xyzinit/final, implies -n");
136
137       --  Line for -m switch
138
139       Write_Line ("  -mnnn     Limit number of detected errors " &
140                   "to nnn (1-999999)");
141
142       --  Line for -M switch
143
144       Write_Line ("  -Mxyz     Rename generated main program from " &
145                   "main to xyz");
146
147       --  Line for -n switch
148
149       Write_Line ("  -n        No Ada main program (foreign main routine)");
150
151       --  Line for -nostdinc
152
153       Write_Line ("  -nostdinc Don't look for source files " &
154                   "in the system default directory");
155
156       --  Line for -nostdlib
157
158       Write_Line ("  -nostdlib Don't look for library files " &
159                   "in the system default directory");
160
161       --  Line for -o switch
162
163       Write_Line ("  -o file   Give the output file name " &
164                   "(default is b~xxx.adb)");
165
166       --  Line for -O switch
167
168       Write_Line ("  -O        Give list of objects required for link");
169
170       --  Line for -p switch
171
172       Write_Line ("  -p        Pessimistic (worst-case) elaboration order");
173
174       --  Line for -r switch
175
176       Write_Line ("  -r        List restrictions that could be applied " &
177                   "to this partition");
178
179       --  Line for -s switch
180
181       Write_Line ("  -s        Require all source files to be present");
182
183       --  Line for -S?? switch
184
185       Write_Line ("  -S??      Sin/lo/hi/xx/ev Initialize_Scalars " &
186                   "invalid/low/high/hex/env var");
187
188       --  Line for -static
189
190       Write_Line ("  -static   Link against a static GNAT run time");
191
192       --  Line for -shared
193
194       Write_Line ("  -shared   Link against a shared GNAT run time");
195
196       --  Line for -t switch
197
198       Write_Line ("  -t        Tolerate time stamp and other " &
199                   "consistency errors");
200
201       --  Line for -T switch
202
203       Write_Line ("  -Tn       Set time slice value to n " &
204                   "milliseconds (n >= 0)");
205
206       --  Line for -u switch
207
208       Write_Line ("  -un       Enable dynamic stack analysis, with " &
209                   "n results stored");
210
211       --  Line for -v switch
212
213       Write_Line ("  -v        Verbose mode. Error messages, " &
214                   "header, summary output to stdout");
215
216       --  Lines for -w switch
217
218       Write_Line ("  -wx       Warning mode. (x=s/e for " &
219                   "suppress/treat as error)");
220
221       --  Line for -x switch
222
223       Write_Line ("  -x        Exclude source files (check object " &
224                   "consistency only)");
225
226       --  Line for X switch
227
228       Write_Line ("  -Xnnn     Default exit status value = nnn");
229
230       --  Line for -z switch
231
232       Write_Line ("  -z        No main subprogram (zero main)");
233
234       --  Line for --RTS
235
236       Write_Line ("  --RTS=dir specify the default source and " &
237                   "object search path");
238
239       --  Line for sfile
240
241       Write_Line ("  lfile     Library file names");
242    end Display;
243
244 end Bindusg;