1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
11 -- Copyright (C) 1992-2001 Free Software Foundation, Inc. --
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. --
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). --
27 ------------------------------------------------------------------------------
29 with Osint; use Osint;
30 with Output; use Output;
35 procedure Write_Switch_Char;
36 -- Write two spaces followed by appropriate switch character
38 procedure Write_Switch_Char is
41 Write_Char (Switch_Character);
42 end Write_Switch_Char;
44 -- Start of processing for Makeusg
49 Write_Str ("Usage: ");
50 Osint.Write_Program_Name;
51 Write_Str (" opts name ");
52 Write_Str ("{[-cargs opts] [-bargs opts] [-largs opts]}");
55 Write_Str (" name is a file name from which you can omit the");
56 Write_Str (" .adb or .ads suffix");
62 Write_Str ("gnatmake switches:");
68 Write_Str ("a Consider all files, even readonly ali files");
74 Write_Str ("b Bind only");
80 Write_Str ("c Compile only");
86 Write_Str ("f Force recompilations of non predefined units");
92 Write_Str ("i In place. Replace existing ali file, ");
93 Write_Str ("or put it with source");
99 Write_Str ("jnum Use nnn processes to compile");
105 Write_Str ("k Keep going after compilation errors");
111 Write_Str ("l Link only");
117 Write_Str ("m Minimal recompilation");
123 Write_Str ("M List object file dependences for Makefile");
129 Write_Str ("n Check objects up to date, output next file ");
130 Write_Str ("to compile if not");
136 Write_Str ("o name Choose an alternate executable name");
142 Write_Str ("Pproj Use GNAT Project File proj");
148 Write_Str ("q Be quiet/terse");
154 Write_Str ("s Recompile if compiler switches have changed");
160 Write_Str ("u Unique compilation. Only compile the given file.");
166 Write_Str ("v Display reasons for all (re)compilations");
172 Write_Str ("vPx Specify verbosity when parsing GNAT Project Files");
178 Write_Str ("Xnm=val Specify an external reference for GNAT Project Files");
184 Write_Str ("z No main subprogram (zero main)");
188 Write_Str (" --GCC=command Use this gcc command");
191 Write_Str (" --GNATBIND=command Use this gnatbind command");
194 Write_Str (" --GNATLINK=command Use this gnatlink command");
198 -- Source and Library search path switches
200 Write_Str ("Source and Library search path switches:");
206 Write_Str ("aLdir Skip missing library sources if ali in dir");
212 Write_Str ("Adir like -aLdir -aIdir");
215 -- Line for -aO switch
218 Write_Str ("aOdir Specify library/object files search path");
221 -- Line for -aI switch
224 Write_Str ("aIdir Specify source files search path");
227 -- Line for -I switch
230 Write_Str ("Idir Like -aIdir -aOdir");
233 -- Line for -I- switch
236 Write_Str ("I- Don't look for sources & library files");
237 Write_Str (" in the default directory");
243 Write_Str ("Ldir Look for program libraries also in dir");
246 -- Line for -nostdinc
249 Write_Str ("nostdinc Don't look for sources");
250 Write_Str (" in the system default directory");
253 -- Line for -nostdlib
256 Write_Str ("nostdlib Don't look for library files");
257 Write_Str (" in the system default directory");
261 -- General Compiler, Binder, Linker switches
263 Write_Str ("To pass an arbitrary switch to the Compiler, ");
264 Write_Str ("Binder or Linker:");
270 Write_Str ("cargs opts opts are passed to the compiler");
276 Write_Str ("bargs opts opts are passed to the binder");
282 Write_Str ("largs opts opts are passed to the linker");
285 -- Add usage information for gcc