1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
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 3, 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 COPYING3. If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
28 with Output
; use Output
;
29 with Switch
; use Switch
;
34 -- Start of processing for Makeusg
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]}");
45 Write_Str
(" name is one or more file name from which you");
46 Write_Str
(" can omit the .adb or .ads suffix");
52 Write_Str
("gnatmake switches:");
55 Display_Usage_Version_And_Help
;
59 Write_Str
(" -Pproj Build GNAT Project File proj using GPRbuild");
61 Write_Str
(" Treats all other switches as GPRbuild switches");
66 Write_Str
(" -a Consider all files, even readonly ali files");
71 Write_Str
(" -b Bind only");
76 Write_Str
(" -B Build, bind and link full project");
81 Write_Str
(" -c Compile only");
86 Write_Str
(" -C Cache source mappings: " &
87 "invoke compiler with temp mapping file");
90 -- Line for -C=<mapping file>
92 Write_Str
(" -C=mapp Cache source mappings: " &
93 "invoke compiler with mapping file mapp");
98 Write_Str
(" -d Display compilation progress");
103 Write_Str
(" -D dir Specify dir as the object directory");
108 Write_Str
(" -eI Index of unit in multi-unit source file");
113 Write_Str
(" -eL Follow symbolic links when processing " &
119 Write_Str
(" -eS Echo commands to stdout instead of stderr");
124 Write_Str
(" -f Force recompilations of non predefined units");
129 Write_Str
(" -F Full project path name in brief error messages");
134 Write_Str
(" -i In place. Replace existing ali file, ");
135 Write_Str
("or put it with source");
140 Write_Str
(" -jnum Use nnn processes to compile");
145 Write_Str
(" -k Keep going after compilation errors");
150 Write_Str
(" -l Link only");
155 Write_Str
(" -m Minimal recompilation");
160 Write_Str
(" -M List object file dependences for Makefile");
165 Write_Str
(" -n Check objects up to date, output next file ");
166 Write_Str
("to compile if not");
171 Write_Str
(" -o name Choose an alternate executable name");
176 Write_Str
(" -p Create missing obj, lib and exec dirs");
181 Write_Str
(" -q Be quiet/terse");
186 Write_Str
(" -R Do not use a run_path_option when linking");
191 Write_Str
(" -s Recompile if compiler switches have changed");
196 Write_Str
(" -u Unique compilation, only compile the given files");
201 Write_Str
(" -U Unique compilation for all sources of all projects");
206 Write_Str
(" -v Display reasons for all (re)compilations");
211 Write_Str
(" -vl Verbose output (low verbosity)");
216 Write_Str
(" -vm Verbose output (medium verbosity)");
221 Write_Str
(" -vh Equivalent to -v (high verbosity)");
226 Write_Str
(" -vPx Specify verbosity when parsing GNAT Project Files");
231 Write_Str
(" -we Treat all warnings as errors");
236 Write_Str
(" -wn Normal warning mode (cancels -we/-ws)");
241 Write_Str
(" -ws Suppress all warnings");
247 "Allow compilation of needed units external to the projects");
252 Write_Str
(" -Xnm=val Specify an external reference for GNAT " &
258 Write_Str
(" -z No main subprogram (zero main)");
262 Write_Str
(" --create-map-file Create map file mainprog.map");
265 Write_Str
(" --create-map-file=mapfile");
267 Write_Str
(" Create map file mapfile");
270 Write_Str
(" --keep-temp-files Keep temporary files");
273 Write_Str
(" --GCC=command Use this gcc command");
276 Write_Str
(" --GNATBIND=command Use this gnatbind command");
279 Write_Str
(" --GNATLINK=command Use this gnatlink command");
283 -- Source and Library search path switches
285 Write_Str
("Project, Source and Library search path switches:");
290 Write_Str
(" -aPdir Add directory dir to project search path");
295 Write_Str
(" -aLdir Skip missing library sources if ali in dir");
300 Write_Str
(" -Adir like -aLdir -aIdir");
303 -- Line for -aO switch
305 Write_Str
(" -aOdir Specify library/object files search path");
308 -- Line for -aI switch
310 Write_Str
(" -aIdir Specify source files search path");
313 -- Line for -I switch
315 Write_Str
(" -Idir Like -aIdir -aOdir");
318 -- Line for -I- switch
320 Write_Str
(" -I- Don't look for sources & library files");
321 Write_Str
(" in the default directory");
326 Write_Str
(" -Ldir Look for program libraries also in dir");
329 -- Line for -nostdinc
331 Write_Str
(" -nostdinc Don't look for sources");
332 Write_Str
(" in the system default directory");
335 -- Line for -nostdlib
337 Write_Str
(" -nostdlib Don't look for library files");
338 Write_Str
(" in the system default directory");
343 Write_Str
(" --RTS=dir specify the default source and object search"
347 -- Line for --subdirs=
349 Write_Str
(" --subdirs=dir real obj/lib/exec dirs are subdirs");
352 -- Line for --source-info=
355 Write_Str
(Make_Util
.Source_Info_Option
);
356 Write_Str
("file specify a source info file");
359 -- Line for --unchecked-shared-lib-imports
362 Write_Str
(Make_Util
.Unchecked_Shared_Lib_Imports
);
364 Write_Str
(" Allow shared libraries to import static libraries");
368 -- General Compiler, Binder, Linker switches
370 Write_Str
("To pass an arbitrary switch to the Compiler, ");
371 Write_Str
("Binder or Linker:");
376 Write_Str
(" -cargs opts opts are passed to the compiler");
381 Write_Str
(" -bargs opts opts are passed to the binder");
386 Write_Str
(" -largs opts opts are passed to the linker");
391 Write_Str
(" -margs opts opts are passed to gnatmake");
394 -- Add usage information for gcc