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